Class EntityConditionList<T extends EntityCondition>
java.lang.Object
org.apache.ofbiz.entity.condition.EntityConditionList<T>
- All Implemented Interfaces:
Serializable
,IsEmpty
,EntityCondition
A condition expression corresponding to an ordered collection of conditions
that are joined by an operator.
The main objective it to express the conjunction or disjunction of a set of
conditions which in the case of conjunction corresponds to SQL expression
of the form foo=bar AND bar=baz AND ...
.
- See Also:
-
Field Summary
Fields inherited from interface org.apache.ofbiz.entity.condition.EntityCondition
serialVersionUID
-
Constructor Summary
ConstructorDescriptionEntityConditionList
(List<? extends T> conditionList, EntityJoinOperator operator) Constructs an entity condition list. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(EntityConditionVisitor visitor) Applies a visitor to this condition.void
checkCondition
(ModelEntity modelEntity) Verifies that this condition expression is valid.boolean
freeze()
Create a Frozen condition expression corresponding to this condition expression.getCondition
(int index) Gets the condition expression stored at a particular of the internal list of conditions.Provides an iterator to iterate on the internal list of condition expressions.int
Provides the size of the internal list of condition expressions.Gets the infix operator used to combine every elements in the list of conditions.int
hashCode()
boolean
isEmpty()
makeWhereString
(ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, Datasource datasourceInfo) Dumps the corresponding SQL string.boolean
mapMatches
(Delegator delegator, Map<String, ? extends Object> map) Checks that this condition expression matches a particular entity.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.ofbiz.entity.condition.EntityCondition
entityMatches, makeWhereString
-
Constructor Details
-
EntityConditionList
Constructs an entity condition list.- Parameters:
conditionList
- the list of conditionsoperator
- the operator used to join the list of conditions
-
-
Method Details
-
getConditionListSize
public int getConditionListSize()Provides the size of the internal list of condition expressions.- Returns:
- the size of the internal list of condition expressions
-
getConditionIterator
Provides an iterator to iterate on the internal list of condition expressions.- Returns:
- an iterator iterating on the internal list of condition expressions
-
accept
Description copied from interface:EntityCondition
Applies a visitor to this condition.- Parameters:
visitor
- the visitor to be applied
-
getConditions
-
getOperator
Gets the infix operator used to combine every elements in the list of conditions.- Returns:
- the infix operator used to combine every elements in the list of conditions.
-
getCondition
Gets the condition expression stored at a particular of the internal list of conditions.- Parameters:
index
- the index of the condition expression to find- Returns:
- the corresponding condition expression
-
isEmpty
public boolean isEmpty() -
makeWhereString
public String makeWhereString(ModelEntity modelEntity, List<EntityConditionParam> entityConditionParams, Datasource datasourceInfo) Description copied from interface:EntityCondition
Dumps the corresponding SQL string.- Specified by:
makeWhereString
in interfaceEntityCondition
- Parameters:
modelEntity
- the model of the entityentityConditionParams
- the effective parameters used to substitute '?' parametersdatasourceInfo
- the model of the data source interpreting the SQL- Returns:
- the corresponding SQL string
-
checkCondition
Description copied from interface:EntityCondition
Verifies that this condition expression is valid.- Specified by:
checkCondition
in interfaceEntityCondition
- Parameters:
modelEntity
- the model of the entity- Throws:
GenericModelException
- when this condition expression is not valid
-
mapMatches
Description copied from interface:EntityCondition
Checks that this condition expression matches a particular entity.- Specified by:
mapMatches
in interfaceEntityCondition
- Parameters:
delegator
- the delegator used to matchmap
- the entity definition to match- Returns:
true
if this condition expression matchesmap
when usingdelegator
-
freeze
Description copied from interface:EntityCondition
Create a Frozen condition expression corresponding to this condition expression.- Specified by:
freeze
in interfaceEntityCondition
- Returns:
- the frozen condition expression
-
equals
-
hashCode
public int hashCode() -
toString
-