Class EntityDateFilterCondition
- java.lang.Object
-
- org.apache.ofbiz.entity.condition.EntityConditionBase
-
- org.apache.ofbiz.entity.condition.EntityCondition
-
- org.apache.ofbiz.entity.condition.EntityDateFilterCondition
-
- All Implemented Interfaces:
java.io.Serializable
,IsEmpty
public final class EntityDateFilterCondition extends EntityCondition
Date-range condition.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.ofbiz.entity.condition.EntityConditionBase
_emptyMap, emptyAliases, emptyList
-
-
Constructor Summary
Constructors Constructor Description EntityDateFilterCondition(java.lang.String fromDateName, java.lang.String thruDateName)
-
Method Summary
All Methods Static 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
equals(java.lang.Object obj)
EntityCondition
freeze()
int
hashCode()
boolean
isEmpty()
protected EntityCondition
makeCondition()
static EntityExpr
makeCondition(java.sql.Timestamp moment, java.lang.String fromDateName, java.lang.String thruDateName)
static EntityCondition
makeRangeCondition(java.sql.Timestamp rangeStart, java.sql.Timestamp rangeEnd, java.lang.String fromDateName, java.lang.String thruDateName)
Creates an EntityCondition representing a date range filter query to be used against entities that themselves represent a date range.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
entityMatches, 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
-
mapMatches
public boolean mapMatches(Delegator delegator, java.util.Map<java.lang.String,? extends java.lang.Object> map)
- Specified by:
mapMatches
in classEntityCondition
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classEntityConditionBase
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classEntityConditionBase
-
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
-
freeze
public EntityCondition freeze()
- Specified by:
freeze
in classEntityCondition
-
makeCondition
protected EntityCondition makeCondition()
-
makeCondition
public static EntityExpr makeCondition(java.sql.Timestamp moment, java.lang.String fromDateName, java.lang.String thruDateName)
-
makeRangeCondition
public static EntityCondition makeRangeCondition(java.sql.Timestamp rangeStart, java.sql.Timestamp rangeEnd, java.lang.String fromDateName, java.lang.String thruDateName)
Creates an EntityCondition representing a date range filter query to be used against entities that themselves represent a date range. When used the resulting entities will meet at least one of the following criteria: - fromDate is equal to or after rangeStart but before rangeEnd - thruDate is equal to or after rangeStart but before rangeEnd - fromDate is null and thruDate is equal to or after rangeStart - thruDate is null and fromDate is before rangeEnd - fromDate is null and thruDate is null- Parameters:
rangeStart
- The start of the range to filter againstrangeEnd
- The end of the range to filter againstfromDateName
- The name of the field containing the entity's "fromDate"thruDateName
- The name of the field containing the entity's "thruDate"- Returns:
- EntityCondition representing the date range filter
-
-