Class EntityOperator<L,R,T>
- java.lang.Object
-
- org.apache.ofbiz.entity.condition.EntityConditionBase
-
- org.apache.ofbiz.entity.condition.EntityOperator<L,R,T>
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
EntityComparisonOperator
,EntityJoinOperator
public abstract class EntityOperator<L,R,T> extends EntityConditionBase
Base class for operators (less than, greater than, equals, etc).- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityOperator.CollectionEntityComparisonOperator<E>
Comparison operator forCollection
types.static class
EntityOperator.ComparableEntityComparisonOperator<E>
Comparison operator forComparable
types.
-
Field Summary
-
Fields inherited from class org.apache.ofbiz.entity.condition.EntityConditionBase
_emptyMap, emptyAliases, emptyList
-
-
Constructor Summary
Constructors Constructor Description EntityOperator(int id, java.lang.String code)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
addSqlValue(java.lang.StringBuilder sql, ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, boolean compat, L lhs, R rhs, Datasource datasourceInfo)
void
addSqlValue(java.lang.StringBuilder sql, ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, L lhs, R rhs, Datasource datasourceInfo)
protected <X> void
appendRHSBetweenList(java.util.List<EntityConditionParam> entityConditionParams, java.lang.StringBuilder whereStringBuilder, ModelField field, X rhs)
protected void
appendRHSList(java.util.List<EntityConditionParam> entityConditionParams, java.lang.StringBuilder whereStringBuilder, ModelField field, R rhs)
boolean
entityMatches(GenericEntity entity, L lhs, R rhs)
boolean
equals(java.lang.Object obj)
abstract EntityCondition
freeze(L lhs, R rhs)
java.lang.String
getCode()
int
getId()
int
hashCode()
abstract boolean
isEmpty(L lhs, R rhs)
static <L,R,T>
EntityOperator<L,R,T>lookup(java.lang.String name)
static <L,R>
EntityComparisonOperator<L,R>lookupComparison(java.lang.String name)
static EntityJoinOperator
lookupJoin(java.lang.String name)
abstract boolean
mapMatches(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map, L lhs, R rhs)
static <L,R,T>
voidregister(java.lang.String name, EntityOperator<L,R,T> operator)
java.lang.String
toString()
abstract void
validateSql(ModelEntity entity, L lhs, R rhs)
-
Methods inherited from class org.apache.ofbiz.entity.condition.EntityConditionBase
addValue, castBoolean, equals, getColName, getColName, getColName, getField, hashCode
-
-
-
-
Field Detail
-
ID_EQUALS
public static final int ID_EQUALS
- See Also:
- Constant Field Values
-
ID_NOT_EQUAL
public static final int ID_NOT_EQUAL
- See Also:
- Constant Field Values
-
ID_LESS_THAN
public static final int ID_LESS_THAN
- See Also:
- Constant Field Values
-
ID_GREATER_THAN
public static final int ID_GREATER_THAN
- See Also:
- Constant Field Values
-
ID_LESS_THAN_EQUAL_TO
public static final int ID_LESS_THAN_EQUAL_TO
- See Also:
- Constant Field Values
-
ID_GREATER_THAN_EQUAL_TO
public static final int ID_GREATER_THAN_EQUAL_TO
- See Also:
- Constant Field Values
-
ID_IN
public static final int ID_IN
- See Also:
- Constant Field Values
-
ID_BETWEEN
public static final int ID_BETWEEN
- See Also:
- Constant Field Values
-
ID_NOT
public static final int ID_NOT
- See Also:
- Constant Field Values
-
ID_AND
public static final int ID_AND
- See Also:
- Constant Field Values
-
ID_OR
public static final int ID_OR
- See Also:
- Constant Field Values
-
ID_LIKE
public static final int ID_LIKE
- See Also:
- Constant Field Values
-
ID_NOT_IN
public static final int ID_NOT_IN
- See Also:
- Constant Field Values
-
ID_NOT_LIKE
public static final int ID_NOT_LIKE
- See Also:
- Constant Field Values
-
EQUALS
public static final EntityComparisonOperator<?,?> EQUALS
-
NOT_EQUAL
public static final EntityComparisonOperator<?,?> NOT_EQUAL
-
LESS_THAN
public static final EntityComparisonOperator<?,?> LESS_THAN
-
GREATER_THAN
public static final EntityComparisonOperator<?,?> GREATER_THAN
-
LESS_THAN_EQUAL_TO
public static final EntityComparisonOperator<?,?> LESS_THAN_EQUAL_TO
-
GREATER_THAN_EQUAL_TO
public static final EntityComparisonOperator<?,?> GREATER_THAN_EQUAL_TO
-
IN
public static final EntityComparisonOperator<?,?> IN
-
BETWEEN
public static final EntityComparisonOperator<?,?> BETWEEN
-
NOT
public static final EntityComparisonOperator<?,?> NOT
-
AND
public static final EntityJoinOperator AND
-
OR
public static final EntityJoinOperator OR
-
LIKE
public static final EntityComparisonOperator<?,?> LIKE
-
NOT_LIKE
public static final EntityComparisonOperator<?,?> NOT_LIKE
-
NOT_IN
public static final EntityComparisonOperator<?,?> NOT_IN
-
idInt
protected int idInt
-
codeString
protected java.lang.String codeString
-
WILDCARD
public static final java.lang.Comparable<?> WILDCARD
-
-
Method Detail
-
register
public static <L,R,T> void register(java.lang.String name, EntityOperator<L,R,T> operator)
-
lookup
public static <L,R,T> EntityOperator<L,R,T> lookup(java.lang.String name)
-
lookupComparison
public static <L,R> EntityComparisonOperator<L,R> lookupComparison(java.lang.String name)
-
lookupJoin
public static EntityJoinOperator lookupJoin(java.lang.String name)
-
getCode
public java.lang.String getCode()
-
getId
public int getId()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classEntityConditionBase
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classEntityConditionBase
-
entityMatches
public boolean entityMatches(GenericEntity entity, L lhs, R rhs)
-
appendRHSList
protected void appendRHSList(java.util.List<EntityConditionParam> entityConditionParams, java.lang.StringBuilder whereStringBuilder, ModelField field, R rhs)
-
appendRHSBetweenList
protected <X> void appendRHSBetweenList(java.util.List<EntityConditionParam> entityConditionParams, java.lang.StringBuilder whereStringBuilder, ModelField field, X rhs)
-
mapMatches
public abstract boolean mapMatches(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map, L lhs, R rhs)
-
validateSql
public abstract void validateSql(ModelEntity entity, L lhs, R rhs) throws GenericModelException
- Throws:
GenericModelException
-
addSqlValue
public void addSqlValue(java.lang.StringBuilder sql, ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, L lhs, R rhs, Datasource datasourceInfo)
-
addSqlValue
public abstract void addSqlValue(java.lang.StringBuilder sql, ModelEntity entity, java.util.List<EntityConditionParam> entityConditionParams, boolean compat, L lhs, R rhs, Datasource datasourceInfo)
-
freeze
public abstract EntityCondition freeze(L lhs, R rhs)
-
-