atg.search.routing.command.search
Class PropConstraint

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.PropConstraint
All Implemented Interfaces:
java.io.Serializable

public class PropConstraint
extends BaseConstraint

A property constraint.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String TAG
           
 
Constructor Summary
PropConstraint()
           
 
Method Summary
protected  PropConstraint createFromParser(atg.search.routing.utils.FastXMLModel pXml, int rootIdx)
           
 StringOp getOperation()
          Returns the operation for the constraint
 java.util.List<PropConstraint> getPropConstraints()
          Returns this constraint as an element of a list
 java.lang.String getPropertyName()
          Returns the property name
 java.lang.String getRepositoryId()
          Returns the optional repository id, or null if not provided.
static java.lang.String getTag()
           
 PropType getType()
          Returns the type of constraint
 java.lang.String getValue()
          Returns the value or first part of range
 java.lang.String getValue1()
          Returns the first value of the range, same as getValue()
 java.lang.String getValue2()
          Returns the second value if this is a range value, otherwise null
 java.lang.Float getWeight()
          Returns the weight
 java.lang.Boolean isCaseSensitive()
          Indicates whether the constraint is case sensitive
 void setCaseSensitive(java.lang.Boolean pCaseSensitive)
          Sets whether the constraint is case sensitive
 void setOperation(StringOp pOperation)
          Sets the operation for the constraint
 void setPropertyName(java.lang.String pPropertyName)
          Sets the property name
 void setRepositoryId(java.lang.String pRepositoryId)
          An optional value used for reporting purposes.
 void setType(PropType pType)
          Sets the type of constraint
 void setValue(java.lang.String pValue)
          Sets the value or first part of range.
 void setValue2(java.lang.String pValue2)
          Sets the second value if this is a range value
 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 the ES Query.
static PropConstraint valueOf(java.lang.String pXml)
          Creates a new property constraint from xml
 
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, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


TAG

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

PropConstraint

public PropConstraint()
Method Detail

getTag

public static java.lang.String getTag()

getPropConstraints

public java.util.List<PropConstraint> getPropConstraints()
Returns this constraint as an element of a list

Overrides:
getPropConstraints in class DocumentSetConstraint
Returns:
this, in a list

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

isCaseSensitive

public java.lang.Boolean isCaseSensitive()
Indicates whether the constraint is case sensitive

Returns:
whether the constraint is case sensitive

setCaseSensitive

public void setCaseSensitive(java.lang.Boolean pCaseSensitive)
Sets whether the constraint is case sensitive

Parameters:
pCaseSensitive - whether the constraint is case sensitive

getOperation

public StringOp getOperation()
Returns the operation for the constraint

Returns:
the operation for the constraint

setOperation

public void setOperation(StringOp pOperation)
Sets the operation for the constraint

Parameters:
pOperation - the operation for the constraint

getPropertyName

public java.lang.String getPropertyName()
Returns the property name

Returns:
the property name

setPropertyName

public void setPropertyName(java.lang.String pPropertyName)
Sets the property name

Parameters:
pPropertyName - the property name

getType

public PropType getType()
Returns the type of constraint

Returns:
type of constraint

setType

public void setType(PropType pType)
Sets the type of constraint

Parameters:
pType - type of constraint

getValue

public java.lang.String getValue()
Returns the value or first part of range

Returns:
value or first part of range

setValue

public void setValue(java.lang.String pValue)
Sets the value or first part of range. If this is a range value, also call setValue2(String).

Parameters:
pValue - value of constraint, or first in a range

getWeight

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

Returns:
the weight

setWeight

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

Parameters:
pWeight - the weight

toXml

public java.lang.String toXml()
Converts this constraint to the XML representation that can be sent in the ES Query.

Specified by:
toXml in class DocumentSetConstraint
Returns:
xml

valueOf

public static PropConstraint valueOf(java.lang.String pXml)
Creates a new property constraint from xml

Parameters:
pXml - property constraint xml
Returns:
a new property constraint

createFromParser

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

getValue1

public java.lang.String getValue1()
Returns the first value of the range, same as getValue()

Returns:
first value of the range, same as getValue()

setValue2

public void setValue2(java.lang.String pValue2)
Sets the second value if this is a range value

Parameters:
pValue2 - the second value if this is a range value

getValue2

public java.lang.String getValue2()
Returns the second value if this is a range value, otherwise null

Returns:
second value if this is a range value, otherwise null