atg.search.routing.command.search
Class DateConstraint

java.lang.Object
  extended by atg.search.routing.command.SearchXMLObject
      extended by atg.search.routing.command.search.DocumentSetConstraint
          extended by atg.search.routing.command.search.BaseConstraint
              extended by atg.search.routing.command.search.DateConstraint
All Implemented Interfaces:
java.io.Serializable

public class DateConstraint
extends BaseConstraint

Allows a constraint to a specific date or a date range. See setDate1(String) and setDate2(String).

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String TAG
           
 
Constructor Summary
DateConstraint()
           
 
Method Summary
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
 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)
           
 
Methods inherited from class atg.search.routing.command.search.BaseConstraint
getXml, setXml
 
Methods inherited from class atg.search.routing.command.search.DocumentSetConstraint
createFromXML, getParser, getPropConstraints
 
Methods inherited from class atg.search.routing.command.SearchXMLObject
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendOptionalValue, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getAllAttributeXML, getAllBodyXML, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toString, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
See Also:
Constant Field Values

TAG

public static final java.lang.String TAG
See Also:
Constant Field Values
Constructor Detail

DateConstraint

public DateConstraint()
Method Detail

getTag

public static java.lang.String getTag()

equals

public boolean equals(java.lang.Object pObject)
Overrides:
equals in class java.lang.Object

getWeight

public java.lang.Float getWeight()
Returns the weight of the constraint

Returns:
the weight of the constraint

setWeight

public void setWeight(java.lang.Float pWeight)
Sets the weight of the constraint

Parameters:
pWeight -

getOperation

public NumOp getOperation()
Returns the number operation

Returns:
the number operation

setOperation

public void setOperation(NumOp pOperation)
Sets the number operation

Parameters:
pOperation -

getDate1

public java.lang.String getDate1()
Returns the first (and possibly the only) date. See getDate2() and setDate1(String)

Returns:
Returns the date.

setDate1

public 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. 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:

Parameters:
pDate1 - a date string, in an appropriate form

getDate2

public java.lang.String getDate2()
Returns the second date if the date is a range of dates.

Returns:
second date in the case of a range

setDate2

public void setDate2(java.lang.String pDate2)
Sets the second date, making this a range constraint. See setDate1(java.lang.String) for acceptable formats.

Parameters:
pDate2 - second date in the case of a range

getBodyXML

protected void getBodyXML(java.lang.StringBuilder sb)
                   throws atg.search.routing.command.IncompleteCommandException
Overrides:
getBodyXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

getAttributeXML

protected void getAttributeXML(java.lang.StringBuilder sb)
                        throws atg.search.routing.command.IncompleteCommandException
Overrides:
getAttributeXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

valueOf

public static DateConstraint valueOf(java.lang.String pXml)

createFromParser

protected DocumentSetConstraint createFromParser(atg.search.routing.utils.SearchMessageNode pXml)
Specified by:
createFromParser in class DocumentSetConstraint

getRequestTag

public java.lang.String getRequestTag()
Specified by:
getRequestTag in class atg.search.routing.command.SearchXMLObject