Class EntityComparisonOperator<L,R>
- java.lang.Object
-
- org.apache.ofbiz.entity.condition.EntityConditionBase
-
- org.apache.ofbiz.entity.condition.EntityOperator<L,R,java.lang.Boolean>
-
- org.apache.ofbiz.entity.condition.EntityComparisonOperator<L,R>
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
EntityOperator.CollectionEntityComparisonOperator
,EntityOperator.ComparableEntityComparisonOperator
public abstract class EntityComparisonOperator<L,R> extends EntityOperator<L,R,java.lang.Boolean>
Base class for comparisons.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ofbiz.entity.condition.EntityOperator
EntityOperator.CollectionEntityComparisonOperator<E>, EntityOperator.ComparableEntityComparisonOperator<E>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Fields inherited from class org.apache.ofbiz.entity.condition.EntityOperator
AND, BETWEEN, codeString, 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, idInt, IN, LESS_THAN, LESS_THAN_EQUAL_TO, LIKE, NOT, NOT_EQUAL, NOT_IN, NOT_LIKE, OR, WILDCARD
-
Fields inherited from class org.apache.ofbiz.entity.condition.EntityConditionBase
_emptyMap, emptyAliases, emptyList
-
-
Constructor Summary
Constructors Constructor Description EntityComparisonOperator(int id, java.lang.String code)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addSqlValue(java.lang.StringBuilder sql, ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, boolean compat, L lhs, R rhs, Datasource datasourceInfo)
abstract boolean
compare(L lhs, R rhs)
static <T> boolean
compareEqual(java.lang.Comparable<T> lhs, T rhs)
static <T> boolean
compareGreaterThan(java.lang.Comparable<T> lhs, T rhs)
static <T> boolean
compareGreaterThanEqualTo(java.lang.Comparable<T> lhs, T rhs)
static <L,R extends L>
booleancompareIn(L lhs, R rhs)
static <T> boolean
compareLessThan(java.lang.Comparable<T> lhs, T rhs)
static <T> boolean
compareLessThanEqualTo(java.lang.Comparable<T> lhs, T rhs)
static <L,R>
booleancompareLike(L lhs, R rhs)
static <T> boolean
compareNotEqual(java.lang.Comparable<T> lhs, T rhs)
java.lang.Boolean
eval(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map, L lhs, R rhs)
protected java.lang.Object
freeze(java.lang.Object item)
EntityCondition
freeze(L lhs, R rhs)
boolean
isEmpty(L lhs, R rhs)
static org.apache.oro.text.regex.Pattern
makeOroPattern(java.lang.String sqlLike)
protected void
makeRHSWhereString(ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, java.lang.StringBuilder sql, ModelField field, R rhs, Datasource datasourceInfo)
protected void
makeRHSWhereStringValue(ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, java.lang.StringBuilder sql, ModelField field, R rhs, Datasource datasourceInfo)
boolean
mapMatches(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map, L lhs, R rhs)
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
-
Methods inherited from class org.apache.ofbiz.entity.condition.EntityConditionBase
addValue, castBoolean, equals, getColName, getColName, getColName, getField, hashCode
-
-
-
-
Method Detail
-
makeOroPattern
public static org.apache.oro.text.regex.Pattern makeOroPattern(java.lang.String sqlLike)
-
validateSql
public void validateSql(ModelEntity entity, L lhs, R rhs) throws GenericModelException
- Specified by:
validateSql
in classEntityOperator<L,R,java.lang.Boolean>
- Throws:
GenericModelException
-
addSqlValue
public void addSqlValue(java.lang.StringBuilder sql, ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, boolean compat, L lhs, R rhs, Datasource datasourceInfo)
- Specified by:
addSqlValue
in classEntityOperator<L,R,java.lang.Boolean>
-
isEmpty
public boolean isEmpty(L lhs, R rhs)
- Specified by:
isEmpty
in classEntityOperator<L,R,java.lang.Boolean>
-
makeRHSWhereString
protected void makeRHSWhereString(ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, java.lang.StringBuilder sql, ModelField field, R rhs, Datasource datasourceInfo)
-
makeRHSWhereStringValue
protected void makeRHSWhereStringValue(ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, java.lang.StringBuilder sql, ModelField field, R rhs, Datasource datasourceInfo)
-
eval
public java.lang.Boolean eval(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map, L lhs, R rhs)
-
mapMatches
public boolean mapMatches(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map, L lhs, R rhs)
- Specified by:
mapMatches
in classEntityOperator<L,R,java.lang.Boolean>
-
freeze
public EntityCondition freeze(L lhs, R rhs)
- Specified by:
freeze
in classEntityOperator<L,R,java.lang.Boolean>
-
freeze
protected java.lang.Object freeze(java.lang.Object item)
-
compareEqual
public static final <T> boolean compareEqual(java.lang.Comparable<T> lhs, T rhs)
-
compareNotEqual
public static final <T> boolean compareNotEqual(java.lang.Comparable<T> lhs, T rhs)
-
compareGreaterThan
public static final <T> boolean compareGreaterThan(java.lang.Comparable<T> lhs, T rhs)
-
compareGreaterThanEqualTo
public static final <T> boolean compareGreaterThanEqualTo(java.lang.Comparable<T> lhs, T rhs)
-
compareLessThan
public static final <T> boolean compareLessThan(java.lang.Comparable<T> lhs, T rhs)
-
compareLessThanEqualTo
public static final <T> boolean compareLessThanEqualTo(java.lang.Comparable<T> lhs, T rhs)
-
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)
-
-