public class DateConstraint extends BaseConstraint
setDate1(String)
and setDate2(String)
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
static java.lang.String |
TAG |
Constructor and Description |
---|
DateConstraint() |
Modifier and Type | Method and Description |
---|---|
protected DocumentSetConstraint |
createFromParser(atg.search.routing.utils.SearchMessageNode pXml) |
boolean |
equals(java.lang.Object pObject) |
protected void |
getAttributeXML(java.lang.StringBuilder sb) |
protected void |
getBodyXML(java.lang.StringBuilder sb) |
java.lang.String |
getDate1()
Returns the first (and possibly the only) date.
|
java.lang.String |
getDate2()
Returns the second date if the date is a range of dates.
|
NumOp |
getOperation()
Returns the number operation
|
java.lang.String |
getRequestTag() |
static java.lang.String |
getTag() |
java.lang.Float |
getWeight()
Returns the weight of the constraint
|
int |
hashCode() |
void |
setDate1(java.lang.String pDate1)
If the second date is not set via
setDate2(String) , then this date will be the only date; the operation
(see setOperation(atg.search.routing.command.search.NumOp) ) will apply. |
void |
setDate2(java.lang.String pDate2)
Sets the second date, making this a range constraint.
|
void |
setOperation(NumOp pOperation)
Sets the number operation
|
void |
setWeight(java.lang.Float pWeight)
Sets the weight of the constraint
|
static DateConstraint |
valueOf(java.lang.String pXml) |
getXml, setXml
createFromXML, getParser, getPropConstraints
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendOptionalValue, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getAllAttributeXML, getAllBodyXML, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toString, toXML, toXML
public static final java.lang.String CLASS_VERSION
public static final java.lang.String TAG
public static java.lang.String getTag()
public boolean equals(java.lang.Object pObject)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Float getWeight()
public void setWeight(java.lang.Float pWeight)
pWeight
- public NumOp getOperation()
public void setOperation(NumOp pOperation)
pOperation
- public java.lang.String getDate1()
getDate2()
and setDate1(String)
public void setDate1(java.lang.String pDate1)
setDate2(String)
, then this date will be the only date; the operation
(see setOperation(atg.search.routing.command.search.NumOp)
) will apply. If the second date is specified, then
it will be a range delimited according to the chosen operation (see (atg.search.routing.command.search.NumOp)
).
The only acceptable date formats are as follows:
YY or YYYY
MM/YY (or MM/YYYY)
MM/DD/YY (or MM/DD/YYYY)
pDate1
- a date string, in an appropriate formpublic java.lang.String getDate2()
public void setDate2(java.lang.String pDate2)
setDate1(java.lang.String)
for acceptable formats.pDate2
- second date in the case of a rangeprotected void getBodyXML(java.lang.StringBuilder sb) throws atg.search.routing.command.IncompleteCommandException
getBodyXML
in class atg.search.routing.command.SearchXMLObject
atg.search.routing.command.IncompleteCommandException
protected void getAttributeXML(java.lang.StringBuilder sb) throws atg.search.routing.command.IncompleteCommandException
getAttributeXML
in class atg.search.routing.command.SearchXMLObject
atg.search.routing.command.IncompleteCommandException
public static DateConstraint valueOf(java.lang.String pXml)
protected DocumentSetConstraint createFromParser(atg.search.routing.utils.SearchMessageNode pXml)
createFromParser
in class DocumentSetConstraint
public java.lang.String getRequestTag()
getRequestTag
in class atg.search.routing.command.SearchXMLObject