Package org.ofbiz.core.entity
Class EntityExpr
java.lang.Object
org.ofbiz.core.entity.EntityCondition
org.ofbiz.core.entity.EntityExpr
- All Implemented Interfaces:
Serializable
Encapsulates simple expressions used for specifying queries
- Since:
- 2.0
- Version:
- $Revision: 1.1 $
- Author:
- David E. Jones
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEntityExpr(String lhs, boolean leftUpper, EntityOperator operator, Object rhs, boolean rightUpper) EntityExpr(String lhs, EntityOperator operator, Object rhs) EntityExpr(EntityCondition lhs, EntityOperator operator, EntityCondition rhs) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckCondition(ModelEntity modelEntity) Checks this condition against the given entity.getLhs()intgetParameterCount(ModelEntity modelEntity, SqlEscapeHelper sqlEscapeHelper) Returns the number of SQL parameters that would be generated for this condition.getRhs()booleanisLUpper()booleanisRUpper()makeWhereString(ModelEntity modelEntity, List<? super EntityConditionParam> entityConditionParams, SqlEscapeHelper sqlEscapeHelper) Creates a string for use in a WHERE clause, based on this condition.voidsetLUpper(boolean upper) voidsetRUpper(boolean upper) toString()
-
Constructor Details
-
EntityExpr
protected EntityExpr() -
EntityExpr
-
EntityExpr
public EntityExpr(String lhs, boolean leftUpper, EntityOperator operator, Object rhs, boolean rightUpper) -
EntityExpr
-
-
Method Details
-
setLUpper
public void setLUpper(boolean upper) -
isLUpper
public boolean isLUpper() -
isRUpper
public boolean isRUpper() -
setRUpper
public void setRUpper(boolean upper) -
getLhs
-
getOperator
-
getRhs
-
makeWhereString
public String makeWhereString(ModelEntity modelEntity, List<? super EntityConditionParam> entityConditionParams, SqlEscapeHelper sqlEscapeHelper) Description copied from class:EntityConditionCreates a string for use in a WHERE clause, based on this condition.- Specified by:
makeWhereStringin classEntityCondition- Parameters:
modelEntity- the entity being queried for (required)entityConditionParams- a non-null list to which this method will add any required bind values- Returns:
- a non-null string
-
checkCondition
Description copied from class:EntityConditionChecks this condition against the given entity.- Specified by:
checkConditionin classEntityCondition- Parameters:
modelEntity- the entity being queried for (required)- Throws:
GenericModelException- if the condition is not met
-
getParameterCount
Description copied from class:EntityConditionReturns the number of SQL parameters that would be generated for this condition.- Overrides:
getParameterCountin classEntityCondition- Parameters:
modelEntity- the entity being queried for (required)- Returns:
- the number of SQL parameters.
-
toString
-