Class RelevantCharacteristicQueryHook
- java.lang.Object
-
- org.openbravo.client.kernel.reference.materialmgmt.RelevantCharacteristicQueryHook
-
- All Implemented Interfaces:
Prioritizable
,AdvancedQueryBuilderHook
@Dependent public class RelevantCharacteristicQueryHook extends Object implements AdvancedQueryBuilderHook
This hooks allows to build the joins, filters and order by clauses for those queries that use a property path that points to a relevant characteristic property.
-
-
Constructor Summary
Constructors Constructor Description RelevantCharacteristicQueryHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<JoinDefinition>
getJoinDefinitions(AdvancedQueryBuilder queryBuilder, List<JoinDefinition> joinDefinitions)
This method can be used to modify the join clauses of the query.String
parseOrderByClausePart(AdvancedQueryBuilder queryBuilder, String orderByPart)
This method is used to provide an alternative way of parsing a part of the order by clause.String
parseSimpleFilterClause(AdvancedQueryBuilder queryBuilder, String fieldName, String operator, Object value)
This method is used to provide an alternative way of parsing a simple filter clause.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openbravo.base.Prioritizable
getPriority
-
-
-
-
Method Detail
-
getJoinDefinitions
public List<JoinDefinition> getJoinDefinitions(AdvancedQueryBuilder queryBuilder, List<JoinDefinition> joinDefinitions)
Description copied from interface:AdvancedQueryBuilderHook
This method can be used to modify the join clauses of the query.- Specified by:
getJoinDefinitions
in interfaceAdvancedQueryBuilderHook
- Parameters:
queryBuilder
- TheAdvancedQueryBuilder
instance. It can be used to access to information related to the query being builtjoinDefinitions
- The current list ofJoinDefinition
for the query being built- Returns:
- the new list of
JoinDefinition
of the query
-
parseSimpleFilterClause
public String parseSimpleFilterClause(AdvancedQueryBuilder queryBuilder, String fieldName, String operator, Object value)
Description copied from interface:AdvancedQueryBuilderHook
This method is used to provide an alternative way of parsing a simple filter clause. Note that this method may return null which means that the filter clause may be parsed by anotherAdvancedQueryBuilderHook
with less priority, if exists. In case there is no hook returning a not null value, then the filter clause will be parsed with the standard logic of theAdvancedQueryBuilder
.- Specified by:
parseSimpleFilterClause
in interfaceAdvancedQueryBuilderHook
- Parameters:
queryBuilder
- TheAdvancedQueryBuilder
instance. It can be used to access to information related to the query being builtfieldName
- The name (it can be a path) of the property being filteredoperator
- The filtering operatorvalue
- The value to filter the property- Returns:
- a String containing the parsed filter clause or null in case this hook is not able to parse the filter clause
-
parseOrderByClausePart
public String parseOrderByClausePart(AdvancedQueryBuilder queryBuilder, String orderByPart)
Description copied from interface:AdvancedQueryBuilderHook
This method is used to provide an alternative way of parsing a part of the order by clause. Note that this method may return null which means that the part of the order by may be parsed by anotherAdvancedQueryBuilderHook
with less priority, if exists. In case there is no hook returning a not null value, then the order by clause will be parsed with the standard logic of theAdvancedQueryBuilder
.- Specified by:
parseOrderByClausePart
in interfaceAdvancedQueryBuilderHook
- Parameters:
queryBuilder
- TheAdvancedQueryBuilder
instance. It can be used to access to information related to the query being builtorderByPart
- One of the parts of order by clause of the query being built- Returns:
- a String with the parsed filter clause or null in case this hook is not able to parse the filter clause
-
-