Sun Adapter for LDAP API

com.stc.connector.ldapadapter.appconn
Class SearchResultsImpl

java.lang.Object
  extended by com.stc.connector.ldapadapter.appconn.SearchResultsImpl
All Implemented Interfaces:
SearchResults

public class SearchResultsImpl
extends java.lang.Object
implements SearchResults

This class is used to fetch the results from a search operation and also to initiate a manual referral follow when referrals are returned by the search operation.

Version:
$Revision: 1.8 $
Author:

Constructor Summary
protected SearchResultsImpl(LDAPClientApplicationImpl app)
          Creates a new instance of SearchResults
protected SearchResultsImpl(LDAPClientApplicationImpl app, javax.naming.NamingEnumeration searchResults)
          Creates a new instance of SearchResults
 
Method Summary
 void clear()
          Close the underlying result object.
 Result getResult()
          Get the current result.
 boolean hasMoreResults()
          Check to see if any results were returned by the search.
 boolean hasResults()
          Check to see if any results were returned by the search.
 boolean nextResult()
          Get the next result returned by the search.
 void performManualReferralFollow(javax.naming.ldap.LdapReferralException refex)
          Method to perform manual follow of referral.
 void reset()
          Method to reset the values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResultsImpl

protected SearchResultsImpl(LDAPClientApplicationImpl app)
Creates a new instance of SearchResults

Parameters:
app - The LDAP client application associated with this SearchResults instance.

SearchResultsImpl

protected SearchResultsImpl(LDAPClientApplicationImpl app,
                            javax.naming.NamingEnumeration searchResults)
Creates a new instance of SearchResults

Parameters:
app - The LDAP client application associated with this SearchResults instance.
searchResults - the enumeration containing the search results.
Method Detail

reset

public void reset()
Description copied from interface: SearchResults
Method to reset the values

Specified by:
reset in interface SearchResults

getResult

public Result getResult()
                 throws LDAPApplicationException
Get the current result.

Specified by:
getResult in interface SearchResults
Throws:
LDAPApplicationException - if there is no connection is available to the LDAP server.
See Also:
hasResults(), hasMoreResults(), #getNextResult

clear

public void clear()
           throws LDAPApplicationException
Close the underlying result object.

Specified by:
clear in interface SearchResults
Throws:
LDAPApplicationException - if there is no connection is available to the LDAP server.

hasResults

public boolean hasResults()
                   throws LDAPApplicationException
Check to see if any results were returned by the search.

Specified by:
hasResults in interface SearchResults
Throws:
LDAPApplicationException - if there is no connection is available to the LDAP server.
See Also:
SearchOptions, Search.performSearch(), #getNextResult

hasMoreResults

public boolean hasMoreResults()
                       throws LDAPApplicationException
Check to see if any results were returned by the search.

Specified by:
hasMoreResults in interface SearchResults
Throws:
LDAPApplicationException - if there is no connection is available to the LDAP server.
See Also:
SearchOptions, Search.performSearch(), hasResults(), #getNextResult

nextResult

public boolean nextResult()
                   throws LDAPApplicationException
Get the next result returned by the search. Populate the results for retrieval.

Specified by:
nextResult in interface SearchResults
Throws:
LDAPApplicationException - if there is no connection is available to the LDAP server.
See Also:
SearchOptions, Search.performSearch(), hasResults()

performManualReferralFollow

public void performManualReferralFollow(javax.naming.ldap.LdapReferralException refex)
                                 throws LDAPApplicationException
Method to perform manual follow of referral.

Parameters:
refex - the LdapReferralException object used to follow the referral
Throws:
LDAPApplicationException - if there is no connection is available to the LDAP server.

Sun Adapter for LDAP API