Class EntityWhereString
- java.lang.Object
-
- org.apache.ofbiz.entity.condition.EntityConditionBase
-
- org.apache.ofbiz.entity.condition.EntityCondition
-
- org.apache.ofbiz.entity.condition.EntityWhereString
-
- All Implemented Interfaces:
java.io.Serializable
,IsEmpty
public final class EntityWhereString extends EntityCondition
Encapsulates SQL expressions used for where clause snippets. NOTE: This is UNSAFE and BREAKS the idea behind the Entity Engine where you avoid directly specifying SQL. So, KEEP IT MINIMAL and preferably replace it when the feature you are getting at is implemented in a more automatic way for you.
By minimal I mean use this in conjunction with other EntityConditions like the EntityExpr, EntityConditionList and EntityFieldMap objects which more cleanly encapsulate where conditions and don't require you to directly write SQL.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.ofbiz.entity.condition.EntityConditionBase
_emptyMap, emptyAliases, emptyList
-
-
Constructor Summary
Constructors Constructor Description EntityWhereString(java.lang.String sqlString)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(EntityConditionVisitor visitor)
Applies a visitor to this condition.void
checkCondition(ModelEntity modelEntity)
boolean
entityMatches(GenericEntity entity)
boolean
equals(java.lang.Object obj)
EntityCondition
freeze()
java.lang.String
getWhereString()
int
hashCode()
boolean
isEmpty()
java.lang.String
makeWhereString(ModelEntity modelEntity, java.util.List<EntityConditionParam> entityConditionParams, Datasource datasourceInfo)
boolean
mapMatches(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map)
-
Methods inherited from class org.apache.ofbiz.entity.condition.EntityCondition
eval, eval, makeCondition, makeCondition, makeCondition, makeCondition, makeCondition, makeCondition, makeCondition, makeCondition, makeCondition, makeCondition, makeCondition, makeCondition, makeConditionDate, makeConditionMap, makeConditionWhere, toString
-
Methods inherited from class org.apache.ofbiz.entity.condition.EntityConditionBase
addValue, castBoolean, equals, getColName, getColName, getColName, getField, hashCode
-
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
-
makeWhereString
public java.lang.String makeWhereString(ModelEntity modelEntity, java.util.List<EntityConditionParam> entityConditionParams, Datasource datasourceInfo)
- Specified by:
makeWhereString
in classEntityCondition
-
checkCondition
public void checkCondition(ModelEntity modelEntity) throws GenericModelException
- Specified by:
checkCondition
in classEntityCondition
- Throws:
GenericModelException
-
entityMatches
public boolean entityMatches(GenericEntity entity)
- Overrides:
entityMatches
in classEntityCondition
-
mapMatches
public boolean mapMatches(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map)
- Specified by:
mapMatches
in classEntityCondition
-
getWhereString
public java.lang.String getWhereString()
-
freeze
public EntityCondition freeze()
- Specified by:
freeze
in classEntityCondition
-
accept
public void accept(EntityConditionVisitor visitor)
Description copied from class:EntityCondition
Applies a visitor to this condition.- Specified by:
accept
in classEntityCondition
- Parameters:
visitor
- the visitor to be applied
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classEntityConditionBase
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classEntityConditionBase
-
-