Class EntityOperator<L,R>
java.lang.Object
org.apache.ofbiz.entity.condition.EntityOperator<L,R>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
EntityComparisonOperator
,EntityJoinOperator
Base class for operators (less than, greater than, equals, etc).
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Comparison operator forCollection
types.static class
Comparison operator forComparable
types. -
Field Summary
Modifier and TypeFieldDescriptionstatic final EntityJoinOperator
static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final EntityComparisonOperator<?,
?> static final EntityJoinOperator
static final Comparable<?>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
addSqlValue
(StringBuilder sql, ModelEntity entity, List<EntityConditionParam> entityConditionParams, boolean compat, L lhs, R rhs, Datasource datasourceInfo) void
addSqlValue
(StringBuilder sql, ModelEntity entity, List<EntityConditionParam> entityConditionParams, L lhs, R rhs, Datasource datasourceInfo) Add sql value.protected <X> void
appendRHSBetweenList
(List<EntityConditionParam> entityConditionParams, StringBuilder whereStringBuilder, ModelField field, X rhs) Append rhs between list.protected void
appendRHSList
(List<EntityConditionParam> entityConditionParams, StringBuilder whereStringBuilder, ModelField field, R rhs) Append rhs list.boolean
entityMatches
(GenericEntity entity, L lhs, R rhs) Entity matches boolean.boolean
abstract EntityCondition
getCode()
Gets code.int
getId()
Gets id.int
hashCode()
abstract boolean
static <L,
R> EntityOperator<L, R> static <L,
R> EntityComparisonOperator<L, R> lookupComparison
(String name) static EntityJoinOperator
lookupJoin
(String name) abstract boolean
static <L,
R> void register
(String name, EntityOperator<L, R> operator) toString()
abstract void
validateSql
(ModelEntity entity, L lhs, R rhs)
-
Field Details
-
ID_EQUALS
public static final int ID_EQUALS- See Also:
-
ID_NOT_EQUAL
public static final int ID_NOT_EQUAL- See Also:
-
ID_LESS_THAN
public static final int ID_LESS_THAN- See Also:
-
ID_GREATER_THAN
public static final int ID_GREATER_THAN- See Also:
-
ID_LESS_THAN_EQUAL_TO
public static final int ID_LESS_THAN_EQUAL_TO- See Also:
-
ID_GREATER_THAN_EQUAL_TO
public static final int ID_GREATER_THAN_EQUAL_TO- See Also:
-
ID_IN
public static final int ID_IN- See Also:
-
ID_BETWEEN
public static final int ID_BETWEEN- See Also:
-
ID_NOT
public static final int ID_NOT- See Also:
-
ID_AND
public static final int ID_AND- See Also:
-
ID_OR
public static final int ID_OR- See Also:
-
ID_LIKE
public static final int ID_LIKE- See Also:
-
ID_NOT_IN
public static final int ID_NOT_IN- See Also:
-
ID_NOT_LIKE
public static final int ID_NOT_LIKE- See Also:
-
EQUALS
-
NOT_EQUAL
-
LESS_THAN
-
GREATER_THAN
-
LESS_THAN_EQUAL_TO
-
GREATER_THAN_EQUAL_TO
-
IN
-
BETWEEN
-
NOT
-
AND
-
OR
-
LIKE
-
NOT_LIKE
-
NOT_IN
-
WILDCARD
-
-
Constructor Details
-
EntityOperator
-
-
Method Details
-
register
-
lookup
-
lookupComparison
-
lookupJoin
-
getCode
Gets code.- Returns:
- the code
-
getId
public int getId()Gets id.- Returns:
- the id
-
toString
-
hashCode
public int hashCode() -
equals
-
entityMatches
Entity matches boolean.- Parameters:
entity
- the entitylhs
- the lhsrhs
- the rhs- Returns:
- the boolean
-
appendRHSList
protected void appendRHSList(List<EntityConditionParam> entityConditionParams, StringBuilder whereStringBuilder, ModelField field, R rhs) Append rhs list.- Parameters:
entityConditionParams
- the entity condition paramswhereStringBuilder
- the where string builderfield
- the fieldrhs
- the rhs
-
appendRHSBetweenList
protected <X> void appendRHSBetweenList(List<EntityConditionParam> entityConditionParams, StringBuilder whereStringBuilder, ModelField field, X rhs) Append rhs between list.- Type Parameters:
X
- the type parameter- Parameters:
entityConditionParams
- the entity condition paramswhereStringBuilder
- the where string builderfield
- the fieldrhs
- the rhs
-
isEmpty
-
mapMatches
-
validateSql
- Throws:
GenericModelException
-
addSqlValue
public void addSqlValue(StringBuilder sql, ModelEntity entity, List<EntityConditionParam> entityConditionParams, L lhs, R rhs, Datasource datasourceInfo) Add sql value.- Parameters:
sql
- the sqlentity
- the entityentityConditionParams
- the entity condition paramslhs
- the lhsrhs
- the rhsdatasourceInfo
- the datasource info
-
addSqlValue
public abstract void addSqlValue(StringBuilder sql, ModelEntity entity, List<EntityConditionParam> entityConditionParams, boolean compat, L lhs, R rhs, Datasource datasourceInfo) -
freeze
-