atg.search.routing.command.search
Class FieldResponse

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

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

Echoed field input for a TreeQueryRequest, with additional information about the associated results. The input class is Field.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
FieldResponse()
           
 
Method Summary
protected static FieldResponse fromXmlParser(atg.search.routing.utils.SearchMessageNode pXml)
           
protected  void getAttributeXML(java.lang.StringBuilder sb)
          Override to provide attributes.
protected  void getBodyXML(java.lang.StringBuilder sb)
          Override to provide the body of the xml.
 int getItems()
          number of items with this field, if possible
 java.lang.String getName()
          Returns the name of the field
 Field.Op getOp()
          Returns the operation
 java.lang.String getRequestTag()
          Gets the xml element tag used in the request
 int getResults()
          Returns number of results after this field has been applied against prior field results
 java.lang.String getValue()
          Returns the field's value
 java.lang.String getWarn()
          Returns the optional warning of query limits or other issues
protected  boolean isNull()
          Returns true if all elements are null.
 void setItems(int pItems)
          Sets number of items with this field, if possible
 void setName(java.lang.String pName)
          Sets the name of the field
 void setOp(Field.Op pOp)
          Sets the operation
 void setResults(int pResults)
          Sets number of results after this field has been applied against prior field results
 void setValue(java.lang.String pValue)
          Sets the Field value
 void setWarn(java.lang.String pWarn)
          Sets the optional warning of query limits or other issues
 
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

FieldResponse

public FieldResponse()
Method Detail

isNull

protected boolean isNull()
Returns true if all elements are null. Useful when a page pre-allocates a bunch of 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 the name of the field

Returns:
name of the field

setName

public void setName(java.lang.String pName)
Sets the name of the field

Parameters:
pName - name of the field

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's 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

getItems

public int getItems()
number of items with this field, if possible

Returns:
number of items with this field, if possible

setItems

public void setItems(int pItems)
Sets number of items with this field, if possible

Parameters:
pItems - number of items with this field, if possible

getResults

public int getResults()
Returns number of results after this field has been applied against prior field results

Returns:
Number of results after this field has been applied against prior field results

setResults

public void setResults(int pResults)
Sets number of results after this field has been applied against prior field results

Parameters:
pResults - Number of results after this field has been applied against prior field results

getWarn

public java.lang.String getWarn()
Returns the optional warning of query limits or other issues

Returns:
Optional warning of query limits or other issues

setWarn

public void setWarn(java.lang.String pWarn)
Sets the optional warning of query limits or other issues

Parameters:
pWarn - Optional warning of query limits or other issues

fromXmlParser

protected static FieldResponse fromXmlParser(atg.search.routing.utils.SearchMessageNode pXml)

getAttributeXML

protected void getAttributeXML(java.lang.StringBuilder sb)
                        throws atg.search.routing.command.IncompleteCommandException
Override to provide attributes.

Overrides:
getAttributeXML in class atg.search.routing.command.SearchXMLObject
Parameters:
sb - shared buffer
Throws:
atg.search.routing.command.IncompleteCommandException - if required values are missing

getBodyXML

protected void getBodyXML(java.lang.StringBuilder sb)
                   throws atg.search.routing.command.IncompleteCommandException
Override to provide the body of the xml. Do not include the main element tag.

Overrides:
getBodyXML in class atg.search.routing.command.SearchXMLObject
Parameters:
sb - shared buffer
Throws:
atg.search.routing.command.IncompleteCommandException