atg.search.routing.command.search
Class NumericConstraint

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

public class NumericConstraint
extends BaseConstraint

Numeric value constraint on the query.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
           
static java.lang.String TAG
           
 
Constructor Summary
NumericConstraint()
           
 
Method Summary
protected  NumericConstraint createFromParser(atg.search.routing.utils.FastXMLModel pXml, int rootIdx)
           
 NumOp getOperation()
          Returns the operation
 java.lang.String getProperty()
          Returns the property
 java.lang.String getRepositoryId()
          Returns the optional repository id, or null if not provided.
static java.lang.String getTag()
           
 java.lang.Double getValue()
          Returns the value (same as getValue1())
 java.lang.Double getValue1()
          Returns the value, or the first part of a range.
 java.lang.Double getValue2()
          Returns the second part of a range value, or null.
 java.lang.Float getWeight()
          Returns the weight
 void setOperation(NumOp pOperation)
          Sets the comparison operation to use
 void setProperty(java.lang.String pProperty)
          Sets the property to constraint against
 void setRepositoryId(java.lang.String pRepositoryId)
          An optional value used for reporting purposes.
 void setValue1(java.lang.Double pValue1)
          Sets the first or only numerica value
 void setValue2(java.lang.Double pValue2)
          Sets the second numeric value, in the case of a range.
 void setWeight(java.lang.Float pWeight)
          Sets the weight
 java.lang.String toXml()
          Converts this constraint to the XML representation that can be sent in request.
static NumericConstraint valueOf(java.lang.String pXml)
          Converts xml into a new instance
 
Methods inherited from class atg.search.routing.command.search.BaseConstraint
getXml, setXml
 
Methods inherited from class atg.search.routing.command.search.DocumentSetConstraint
createFromXML, equals, escapeToXml, getParser, getPropConstraints, toString
 
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

NumericConstraint

public NumericConstraint()
Method Detail

getTag

public static java.lang.String getTag()

getRepositoryId

public java.lang.String getRepositoryId()
Returns the optional repository id, or null if not provided. always null if this is part of a response

Returns:
the optional repository id, or null if not provided. always null if this is part of a response

setRepositoryId

public void setRepositoryId(java.lang.String pRepositoryId)
An optional value used for reporting purposes. it is not used by the engine

Parameters:
pRepositoryId - repository id

getWeight

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

Returns:
weight

setWeight

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

Parameters:
pWeight -

getOperation

public NumOp getOperation()
Returns the operation

Returns:
operation.

getProperty

public java.lang.String getProperty()
Returns the property

Returns:
property.

getValue

public java.lang.Double getValue()
Returns the value (same as getValue1())

Returns:
the value (same as getValue1()).

getValue1

public java.lang.Double getValue1()
Returns the value, or the first part of a range.

Returns:
the value, or the first part of a range.

getValue2

public java.lang.Double getValue2()
Returns the second part of a range value, or null.

Returns:
the second part of a range value, or null.

setProperty

public void setProperty(java.lang.String pProperty)
Sets the property to constraint against

Parameters:
pProperty - the property to constraint against

setValue1

public void setValue1(java.lang.Double pValue1)
Sets the first or only numerica value

Parameters:
pValue1 - the numeric value

setValue2

public void setValue2(java.lang.Double pValue2)
Sets the second numeric value, in the case of a range. Do not set this if a range is not desired.

Parameters:
pValue2 - the second numeric value, in the case of a range. Do not set this if a range is not desired.

setOperation

public void setOperation(NumOp pOperation)
Sets the comparison operation to use

Parameters:
pOperation - the comparison operation to use

toXml

public java.lang.String toXml()
Description copied from class: DocumentSetConstraint
Converts this constraint to the XML representation that can be sent in request. You must override this to provide constraint-specific XML generation.

Specified by:
toXml in class DocumentSetConstraint
Returns:
xml

valueOf

public static NumericConstraint valueOf(java.lang.String pXml)
Converts xml into a new instance

Parameters:
pXml - constraint xml
Returns:
a new numeric constraint instance

createFromParser

protected NumericConstraint createFromParser(atg.search.routing.utils.FastXMLModel pXml,
                                             int rootIdx)
Specified by:
createFromParser in class DocumentSetConstraint