public abstract class SearchResult extends HCIModelAdapter implements OperationResult
abstract Java class is a generic class for
the results returned by all the search operations provided by the SAP CC system.
Note
Consider the direct known subclasses to have the list of the search operations that are available.
When developing your client application, use:
getResult for obtaining the search result
getResultType for obtaining the result type
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:complexType name="SearchResult">
<xs:sequence>
<xs:any namespace="##targetNamespace" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="totalCount" type="xs:integer"/>
<xs:attribute name="last" type="xs:string"/> <!-- The last element of the buffer -->
<xs:attribute name="resultType" type="ResultTypeType"/>
</xs:complexType>
<xs:element name="itemID">
<xs:complexType>
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
</xs:element><xs:simpleType name="ResultTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="ids"/> <!-- IDs of requested objects are returned -->
<xs:enumeration value="attributes"/> <!-- Object attributes are returned -->
<xs:enumeration value="objects"/><!-- Objects are returned -->
</xs:restriction>
</xs:simpleType>
| Constructor and Description |
|---|
SearchResult(java.lang.String searchTagName)
Builds an empty
SearchResult object. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
java.lang.String |
getLastID()
Gets the last ID of the element list.
|
java.lang.String |
getOperandReference()
Gets the code or the reference (if no code exists) that identifies the operand of the operation request;
If the operation is not auditable, the operand reference is
null. |
java.util.Vector |
getResult()
Gets the result according to the result type option (OBJECT_RESULT_TYPE or ATTRIBUTES_RESULT_TYPE).
|
int |
getResultType()
Returns the result type.
|
java.lang.String |
getTagName()
Gets the XML tag name of the HCI model.
|
int |
getTotalCount()
Gets the total count of targetted items;
If this value is set to
-1,
it means that the total count was not
required into the search operation and the
current result contains all requested items. |
void |
marshalAttributes(XMLOutputter output)
Gives an XML representation of the attributes of an object.
|
void |
marshalChild(XMLMarshallable child,
XMLOutputter output) |
void |
marshalChildren(XMLOutputter output)
Gives an XML representation of the child objects of an object.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setAttributeSetResult(java.util.Vector<AttributeSet> attributeSets)
Sets the attribute sets result.
|
void |
setIdResult(java.util.Vector<?> list)
Sets the IDs result.
|
void |
setLastID(java.lang.String id)
Sets the last buffer element ID.
|
void |
setObjectResult(java.util.Vector<XMLMarshallable> list)
Sets the objects result.
|
void |
setResultType(int val)
INTERNAL USE ONLY - Sets the result type.
|
void |
setTotalCount(int n)
Sets the total count.
|
marshalequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmarshalpublic SearchResult(java.lang.String searchTagName)
SearchResult object.public void setObjectResult(java.util.Vector<XMLMarshallable> list)
list - The result objectspublic void setIdResult(java.util.Vector<?> list)
list - The result IDspublic void setAttributeSetResult(java.util.Vector<AttributeSet> attributeSets)
attributeSets - The list of attribute setspublic java.util.Vector getResult()
public int getTotalCount()
-1,
it means that the total count was not
required into the search operation and the
current result contains all requested items.public void setTotalCount(int n)
n - The result numberpublic int getResultType()
SearchFilterModel.ID_RESULT_TYPE,
SearchFilterModel.ATTRIBUTES_RESULT_TYPE,
SearchFilterModel.OBJECT_RESULT_TYPEpublic void setResultType(int val)
val - The new value of the result typeSearchFilterModel.ID_RESULT_TYPE,
SearchFilterModel.ATTRIBUTES_RESULT_TYPE,
SearchFilterModel.OBJECT_RESULT_TYPEpublic java.lang.String getLastID()
public void setLastID(java.lang.String id)
id - The ID of the last buffer elementpublic java.lang.String getOperandReference()
OperationResultnull.getOperandReference in interface OperationResultpublic java.lang.String getTagName()
ITagNameProvidergetTagName in interface ITagNameProviderpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void marshalAttributes(XMLOutputter output)
IXMLMarshallablemarshalAttributes in interface IXMLMarshallableoutput - The XML output to marshal the object attributes intopublic void marshalChildren(XMLOutputter output)
IXMLMarshallablemarshalChildren in interface IXMLMarshallableoutput - The XML output to marshal the child objects intopublic void marshalChild(XMLMarshallable child, XMLOutputter output)