atg.search.routing.command.search
Class Field

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

public class Field
extends atg.search.routing.command.SearchXMLObject

Field input for TreeQueryRequest. All values are required. The request will typically have one or more fields. At least one field must be searchable--see Field.Op. The fields are echoed in the response with additional information. See FieldResponse.

See Also:
Serialized Form

Nested Class Summary
static class Field.Op
          Field operations.
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
Field()
           
 
Method Summary
protected static Field fromXmlParser(atg.search.routing.utils.FastXMLModel pXml, int pItemIdx)
           
protected  void getAttributeXML(java.lang.StringBuilder sb)
           
protected  void getBodyXML(java.lang.StringBuilder sb)
           
 java.lang.String getName()
          Returns a single name, the first if there are multiple, or null if there are none
 java.lang.String[] getNames()
          Returns an array of name strings
 java.lang.String getNames(int pIndex)
          Indexed getter that can be called for any index, even if out of bounds.
 java.lang.String getNamesString()
          Returns the list of names as a comma-delimited string
 Field.Op getOp()
          Returns the Operation
 java.lang.String getRequestTag()
          Gets the xml element tag used in the request
 java.lang.String getValue()
          Returns the Field value
protected  boolean isNull()
          Returns true if all elements are null.
 void setName(java.lang.String pName)
          Sets a single name for the field.
 void setNames(int pIndex, java.lang.String pName)
          Indexed setter that automatically grows the underlying array for any index value.
 void setNames(java.lang.String[] pNames)
          Sets an array of names
 void setNamesString(java.lang.String pNames)
          Initializes the array of names from a comma-delimited string of names
 void setOp(Field.Op pOp)
          Sets the Operation
 void setValue(java.lang.String pValue)
          Sets the Field value
 
Methods inherited from class atg.search.routing.command.SearchXMLObject
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getAllAttributeXML, getAllBodyXML, getDefaultXmlBytes, getParentXMLObject, getXmlPath, setParentXMLObject, toString, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Constructor Detail

Field

public Field()
Method Detail

isNull

protected boolean isNull()
Returns true if all elements are null. Useful when a page pre-allocates a multiple fields but then doesn't fill in the blanks. Use it to block xml generation in the parent class.

Returns:
true if everything is null

getName

public java.lang.String getName()
Returns a single name, the first if there are multiple, or null if there are none

Returns:
the first name of the field

setName

public void setName(java.lang.String pName)
Sets a single name for the field.

Parameters:
pName - name of the field
See Also:
setNames(String[]), setNamesString(String)

setNames

public void setNames(java.lang.String[] pNames)
Sets an array of names

Parameters:
pNames - array of name strings

getNames

public java.lang.String[] getNames()
Returns an array of name strings

Returns:
array of name strings
See Also:
getName(), getNamesString()

setNames

public void setNames(int pIndex,
                     java.lang.String pName)
Indexed setter that automatically grows the underlying array for any index value. Intervening elements will be null.

Parameters:
pName - a statement

getNames

public java.lang.String getNames(int pIndex)
Indexed getter that can be called for any index, even if out of bounds. An out of bounds index will insert a new Name at the specified location, growing the underlying array if necessary

Parameters:
pIndex -
Returns:
a name

getNamesString

public java.lang.String getNamesString()
Returns the list of names as a comma-delimited string

Returns:
comma-delimited String of names

setNamesString

public void setNamesString(java.lang.String pNames)
Initializes the array of names from a comma-delimited string of names

Parameters:
pNames - comma-delimited String of names

getOp

public Field.Op getOp()
Returns the Operation

Returns:
operation

setOp

public void setOp(Field.Op pOp)
Sets the Operation

Parameters:
pOp - operation

getValue

public java.lang.String getValue()
Returns the Field value

Returns:
the field's value

setValue

public void setValue(java.lang.String pValue)
Sets the Field value

Parameters:
pValue - field value

getRequestTag

public java.lang.String getRequestTag()
Gets the xml element tag used in the request

Specified by:
getRequestTag in class atg.search.routing.command.SearchXMLObject
Returns:
xml element tag

fromXmlParser

protected static Field fromXmlParser(atg.search.routing.utils.FastXMLModel pXml,
                                     int pItemIdx)

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

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