Class EntityComparisonOperator<L,R>
java.lang.Object
org.apache.ofbiz.entity.condition.EntityOperator<L,R>
org.apache.ofbiz.entity.condition.EntityComparisonOperator<L,R>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EntityOperator.CollectionEntityComparisonOperator
,EntityOperator.ComparableEntityComparisonOperator
Base class for comparisons.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.ofbiz.entity.condition.EntityOperator
EntityOperator.CollectionEntityComparisonOperator<E>, EntityOperator.ComparableEntityComparisonOperator<E>
-
Field Summary
Fields inherited from class org.apache.ofbiz.entity.condition.EntityOperator
AND, BETWEEN, EQUALS, GREATER_THAN, GREATER_THAN_EQUAL_TO, ID_AND, ID_BETWEEN, ID_EQUALS, ID_GREATER_THAN, ID_GREATER_THAN_EQUAL_TO, ID_IN, ID_LESS_THAN, ID_LESS_THAN_EQUAL_TO, ID_LIKE, ID_NOT, ID_NOT_EQUAL, ID_NOT_IN, ID_NOT_LIKE, ID_OR, IN, LESS_THAN, LESS_THAN_EQUAL_TO, LIKE, NOT, NOT_EQUAL, NOT_IN, NOT_LIKE, OR, WILDCARD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSqlValue
(StringBuilder sql, ModelEntity entity, List<EntityConditionParam> entityConditionParams, boolean compat, L lhs, R rhs, Datasource datasourceInfo) abstract boolean
static final <T> boolean
compareEqual
(Comparable<T> lhs, T rhs) static final <T> boolean
compareGreaterThan
(Comparable<T> lhs, T rhs) static final <T> boolean
compareGreaterThanEqualTo
(Comparable<T> lhs, T rhs) static final <L,
R extends L>
booleancompareIn
(L lhs, R rhs) static final <T> boolean
compareLessThan
(Comparable<T> lhs, T rhs) static final <T> boolean
compareLessThanEqualTo
(Comparable<T> lhs, T rhs) static final <L,
R> boolean compareLike
(L lhs, R rhs) static final <T> boolean
compareNotEqual
(Comparable<T> lhs, T rhs) Eval boolean.protected Object
Freeze object.boolean
static org.apache.oro.text.regex.Pattern
makeOroPattern
(String sqlLike) protected void
makeRHSWhereString
(ModelEntity entity, List<EntityConditionParam> entityConditionParams, StringBuilder sql, ModelField field, R rhs, Datasource datasourceInfo) Make rhs where string.protected void
makeRHSWhereStringValue
(ModelEntity entity, List<EntityConditionParam> entityConditionParams, StringBuilder sql, ModelField field, R rhs, Datasource datasourceInfo) Make rhs where string value.boolean
void
validateSql
(ModelEntity entity, L lhs, R rhs) Methods inherited from class org.apache.ofbiz.entity.condition.EntityOperator
addSqlValue, appendRHSBetweenList, appendRHSList, entityMatches, equals, getCode, getId, hashCode, lookup, lookupComparison, lookupJoin, register, toString
-
Constructor Details
-
EntityComparisonOperator
-
-
Method Details
-
makeOroPattern
-
validateSql
- Specified by:
validateSql
in classEntityOperator<L,
R> - Throws:
GenericModelException
-
addSqlValue
public void addSqlValue(StringBuilder sql, ModelEntity entity, List<EntityConditionParam> entityConditionParams, boolean compat, L lhs, R rhs, Datasource datasourceInfo) - Specified by:
addSqlValue
in classEntityOperator<L,
R>
-
isEmpty
- Specified by:
isEmpty
in classEntityOperator<L,
R>
-
makeRHSWhereString
protected void makeRHSWhereString(ModelEntity entity, List<EntityConditionParam> entityConditionParams, StringBuilder sql, ModelField field, R rhs, Datasource datasourceInfo) Make rhs where string.- Parameters:
entity
- the entityentityConditionParams
- the entity condition paramssql
- the sqlfield
- the fieldrhs
- the rhsdatasourceInfo
- the datasource info
-
makeRHSWhereStringValue
protected void makeRHSWhereStringValue(ModelEntity entity, List<EntityConditionParam> entityConditionParams, StringBuilder sql, ModelField field, R rhs, Datasource datasourceInfo) Make rhs where string value.- Parameters:
entity
- the entityentityConditionParams
- the entity condition paramssql
- the sqlfield
- the fieldrhs
- the rhsdatasourceInfo
- the datasource info
-
compare
-
eval
Eval boolean.- Parameters:
delegator
- the delegatormap
- the maplhs
- the lhsrhs
- the rhs- Returns:
- the boolean
-
mapMatches
- Specified by:
mapMatches
in classEntityOperator<L,
R>
-
freeze
- Specified by:
freeze
in classEntityOperator<L,
R>
-
freeze
Freeze object.- Parameters:
item
- the item- Returns:
- the object
-
compareEqual
-
compareNotEqual
-
compareGreaterThan
-
compareGreaterThanEqualTo
-
compareLessThan
-
compareLessThanEqualTo
-
compareIn
public static final <L,R extends L> boolean compareIn(L lhs, R rhs) -
compareLike
public static final <L,R> boolean compareLike(L lhs, R rhs)
-