SAP CC 1.0
API 4.2 (Core)

com.highdeal.filter.hci
Class SearchResult

java.lang.Object
  extended by com.highdeal.filter.hci.SearchResult
All Implemented Interfaces:
OperationResult, XMLMarshallable
Direct Known Subclasses:
SearchAccessFromSubscriptionResult, SearchAccessResult, SearchAllBatchRatingGroupsResult, SearchSubscriberAccountResult, SearchSubscriptionFromAccessResult, SearchSubscriptionResult, SearchTranslationTableResult

public abstract class SearchResult
extends java.lang.Object
implements OperationResult

This class is a generic abstract class for the results returned by all search operations
Please use getResult for obtaining result.
Please use getResultType for obtaining result type.


XML Schema 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"/> <!-- represent 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="objects"/><!-- objects are returned -->
   </xs:restriction> 
 </xs:simpleType>

Constructor Summary
SearchResult(java.lang.String searchTagName)
          Builds an empty SearchResult.
 
Method Summary
 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 objects, the child represents the marshallable object to be added into the content tree.
 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) identifying the operand of the operation.
 java.util.Vector getResult()
          Gets the result.
 int getResultType()
          Returns the result type.
 int getTotalCount()
          Gets the total count of targetted items.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, and of its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the tag beeing processed.
 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)
          Sets the result type.
 void setTotalCount(int n)
          Sets the total count.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResult

public SearchResult(java.lang.String searchTagName)
Builds an empty SearchResult.

Method Detail

setObjectResult

public void setObjectResult(java.util.Vector<XMLMarshallable> list)
Sets the objects result.

Parameters:
list - the result objects.

setIdResult

public void setIdResult(java.util.Vector<?> list)
Sets the ids result.

Parameters:
list - the result ids.

getResult

public java.util.Vector getResult()
Gets the result.

Returns:
the result object/id list.

getTotalCount

public 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.

Returns:
the total count.

setTotalCount

public void setTotalCount(int n)
Sets the total count.

Parameters:
n - the result number.

getResultType

public int getResultType()
Returns the result type.

Returns:
the result type value (list of ids or objects).
See Also:
SearchFilterModel.ID_RESULT_TYPE, SearchFilterModel.OBJECT_RESULT_TYPE

setResultType

public void setResultType(int val)
Sets the result type. Reserved for internal use.

Parameters:
val - the result type value
See Also:
SearchFilterModel.ID_RESULT_TYPE, SearchFilterModel.OBJECT_RESULT_TYPE

getLastID

public java.lang.String getLastID()
Gets the last id of the element list. This value is related to "from" value which has been set into search operation. This value can be reused if the client whishes to look for next "max" items.
If last is null it means that there is no more elements or no "max" attribute has been set into the related search operation.

Returns:
the last element unique ID of the buffer. (Note : this ID is a String representation of IDs for which the type can differ - INTEGER by example -).

setLastID

public void setLastID(java.lang.String id)
Sets the last buffer element id.

Parameters:
id - the id of the last buffer element.

getOperandReference

public java.lang.String getOperandReference()
Description copied from interface: OperationResult
Gets the code or the reference (if no code exists) identifying the operand of the operation. If the operation is not auditable, the operand reference is null.

Specified by:
getOperandReference in interface OperationResult
Returns:
The operand reference of the result.

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the tag beeing processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - the XML attributes of the current tag.

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - the character data to be added.

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the objects, the child represents the marshallable object to be added into the content tree.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - the name of tag for the child.
child - the child to be added.

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, and of its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - the XML output to marshall the object into.

SAP CC 1.0
API 4.2 (Core)


API Reference - July 2009

SAP Convergent Charging 1.0 (build R4.2.1.35.0.0)
CONVERGENT CHARGING 4.2

(c) Copyright 2009 SAP AG. All rights reserved.