Class EntityDateFilterCondition

    • Constructor Detail

      • EntityDateFilterCondition

        public EntityDateFilterCondition​(java.lang.String fromDateName,
                                         java.lang.String thruDateName)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • mapMatches

        public boolean mapMatches​(Delegator delegator,
                                  java.util.Map<java.lang.String,​? extends java.lang.Object> map)
        Specified by:
        mapMatches in class EntityCondition
      • 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 against
        rangeEnd - The end of the range to filter against
        fromDateName - 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