com.ca.jcs.sdkws.forwardinc
Class UserNamingEnumeration

java.lang.Object
  extended by com.ca.jcs.enumeration.RawNamingEnumeration<SearchResult>
      extended by com.ca.jcs.sdkws.forwardinc.UserNamingEnumeration
All Implemented Interfaces:
Enumeration<SearchResult>, NamingEnumeration<SearchResult>

public class UserNamingEnumeration
extends RawNamingEnumeration<SearchResult>

NamingEnumeration implementation that specifically deals with translating the web service response in to a SearchResult object that the JCS can use. This class handles User objects only. It also is using paging. It expect the handle ID of a query already performed on the endpoint. It will iterate over these results as normal, and it calls the web service for the next page as needed.

Author:
erstr01

Field Summary
static int DEFAULT_PAGE_SIZE
          The default page size
 
Fields inherited from class com.ca.jcs.enumeration.RawNamingEnumeration
countLimit, scope, startTime, timeLimit, visitedCount
 
Constructor Summary
UserNamingEnumeration(SDKWSMetaConnector connector, String connObjectClass, int handleID, int resultSize)
          Constructor that sets the handle id and the resultSize of the result set.
UserNamingEnumeration(SDKWSMetaConnector connector, String connObjectClass, int handleID, int resultSize, int pageSize)
          Constructor that sets the handle id and the resultSize of the result set.
 
Method Summary
 void close()
          Closes this enumeration by releasing the handle on the endpoint.
 boolean rawHasMore()
          Returns true if there are more elements in the childElements iterator.
 SearchResult rawNext()
          Creates the SearchResult object from the next element in the WS result iterator.
 
Methods inherited from class com.ca.jcs.enumeration.RawNamingEnumeration
getCountLimit, getNonFatalException, getTimeLimit, getVisitedCount, hasMore, hasMoreElements, next, nextElement, setCountLimit, setNonFatalException, setTimeLimit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PAGE_SIZE

public static final int DEFAULT_PAGE_SIZE
The default page size

See Also:
Constant Field Values
Constructor Detail

UserNamingEnumeration

public UserNamingEnumeration(SDKWSMetaConnector connector,
                             String connObjectClass,
                             int handleID,
                             int resultSize)
                      throws NamingException
Constructor that sets the handle id and the resultSize of the result set.

Parameters:
connector - the connector.
connObjectClass - the connector object class name. This will be used as the SearchResult's class name.
handleID - the handle ID for paging.
resultSize - the resultSize of the result set.
Throws:
NamingException - if SDKWSMetaConnector is null.

UserNamingEnumeration

public UserNamingEnumeration(SDKWSMetaConnector connector,
                             String connObjectClass,
                             int handleID,
                             int resultSize,
                             int pageSize)
                      throws NamingException
Constructor that sets the handle id and the resultSize of the result set.

Parameters:
connector - the connector.
connObjectClass - the connector object class name. This will be used as the SearchResult's class name.
handleID - the handle ID for paging.
resultSize - the resultSize of the result set.
pageSize - the size of the page to return on each request.
Throws:
NamingException - if SDKWSMetaConnector is null.
Method Detail

rawHasMore

public boolean rawHasMore()
                   throws NamingException
Returns true if there are more elements in the childElements iterator.

Specified by:
rawHasMore in class RawNamingEnumeration<SearchResult>
Returns:
true if there are more elements in the childElements iterator.
Throws:
NamingException - if childElements is null.

rawNext

public SearchResult rawNext()
                     throws NamingException
Creates the SearchResult object from the next element in the WS result iterator.

Specified by:
rawNext in class RawNamingEnumeration<SearchResult>
Returns:
the next SearchResult object.
Throws:
NamingException - if any errors occur.

close

public void close()
           throws NamingException
Closes this enumeration by releasing the handle on the endpoint.

Throws:
NamingException - if any errors occur.


Created 2011-07-14 13:27 EST