public class ItemCreationDateCriteria extends DateCriteria
Date
and also allows you to define
the operator for the queried date (Criteria.EQUAL, Criteria.GREATER_THAN, ...).
Examples:
Date july2008 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").parse("2008-07-06 00:00:00.000");
ItemCreationDateCriteria criteria = new ItemCreationDateCriteria(july2008);
will match the items created on 2008 July 06 at 00:00:00.000.ItemCreationDateCriteria criteria = new ItemCreationDateCriteria(july2008, Criteria.GREATER_THAN);
will match the items created after 2008 July 06, 00:00:00.000.ItemCreationDateCriteria criteria = new ItemCreationDateCriteria("2008-07-06 00:00:00.000");
will match the items created on 2008 July 06 at 00:00:00.000.ItemCreationDateCriteria criteria = new ItemCreationDateCriteria("2008-07-06 00:00:00.000",
"yyyy-MM-dd HH:mm:ss.SSS");
will match the items created on 2008 July 06 at 00:00:00.000.ItemCreationDateCriteria criteria = new ItemCreationDateCriteria("2008-07-06 00:00:00.000",
Criteria.GREATER_THAN)
will match all items created after 2008 July 06, 00:00:00.000.ItemCreationDateCriteria criteria = new ItemCreationDateCriteria("2008-07-06 00:00:00.000",
"yyyy-MM-dd HH:mm:ss.SSS", Criteria.GREATER_THAN)
will match all items created after
2008 July 06, 00:00:00.000.DATE_FORMAT, ORACLE_DATE_CONVERSION_STRING
EQUAL, GREATER_OR_EQUAL_THAN, GREATER_THAN, LESS_OR_EQUAL_THAN, LESS_THAN, LIKE, NOT_EQUAL
Constructor and Description |
---|
ItemCreationDateCriteria(Date creationDate)
Creates a new criteria with a specific creationDate.
|
ItemCreationDateCriteria(Date creationDate,
FieldOperator operator)
Creates a new date criteria with a specific creationDate and that uses the specified field operator.
|
ItemCreationDateCriteria(String creationDate)
Creates a new date criteria with a specific creationDate string and expected in the format
"yyyy-MM-dd HH:mm:ss.SSS".
|
ItemCreationDateCriteria(String creationDate,
FieldOperator operator)
Creates a new date criteria with a specific creationDate string, expected in the format
"yyyy-MM-dd HH:mm:ss.SSS" and that uses the specified field operator.
|
ItemCreationDateCriteria(String creationDate,
String dateFormat)
Creates a new date criteria with a specific creationDate string and expected in the specified dateFormat.
|
ItemCreationDateCriteria(String creationDate,
String dateFormat,
FieldOperator operator)
Creates a new date criteria with a specific creationDate string, expected in the specified
dateFormat and that uses the specified field operator.
|
getConvertedDate, toString
addCriteria, getCriteriaChildren, getCriteriaName, getFieldOperatorAsString, getParentOperator, getSignature, hasAnyCriteria, isLikeOperatorApplicable, isOperator, setParentOperator
public ItemCreationDateCriteria(Date creationDate)
creationDate
- The date to be used by this criteria.public ItemCreationDateCriteria(String creationDate) throws CriteriaException
creationDate
- The string representation of the date (expected in the format "yyyy-MM-dd HH:mm:ss.SSS")
to be used by this criteria.CriteriaException
- if the sent creationDate cannot be parsed with the format "yyyy-MM-dd HH:mm:ss.SSS".public ItemCreationDateCriteria(String creationDate, String dateFormat) throws CriteriaException
creationDate
- The string representation of the date to be used by this criteria.dateFormat
- The the date format in which the creationDate is specified.CriteriaException
- if the sent creationDate cannot be parsed with the given dateFormat.public ItemCreationDateCriteria(String creationDate, FieldOperator operator) throws CriteriaException
creationDate
- The string representation of the date (expected in the format "yyyy-MM-dd HH:mm:ss.SSS")
to be used by this criteria.operator
- Operator for the queried date (Criteria.EQUAL, Criteria.GREATER_THAN, ...).CriteriaException
- if the sent creationDate cannot be parsed with the format "yyyy-MM-dd HH:mm:ss.SSS".public ItemCreationDateCriteria(String creationDate, String dateFormat, FieldOperator operator) throws CriteriaException
creationDate
- The string representation of the date to be used by this criteria.dateFormat
- The the date format in which the creationDate is specified.operator
- Operator for the queried date (Criteria.EQUAL, Criteria.GREATER_THAN, ...).CriteriaException
- if the sent creationDate cannot be parsed with the given dateFormat.public ItemCreationDateCriteria(Date creationDate, FieldOperator operator)
creationDate
- The date to be used by this criteria.operator
- Operator for the queried date (Criteria.EQUAL, Criteria.GREATER_THAN, ...).Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries