|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.AbstractLdapBean
org.ldaptive.SearchResult
public class SearchResult
Simple bean representing an ldap search result. Contains a map of entry DN to ldap entry.
| Constructor Summary | |
|---|---|
SearchResult()
Default constructor. |
|
SearchResult(Collection<LdapEntry> entries)
Creates a new search result. |
|
SearchResult(LdapEntry... entry)
Creates a new search result. |
|
SearchResult(SortBehavior sb)
Creates a new search result. |
|
| Method Summary | |
|---|---|
void |
addEntries(Collection<LdapEntry> entries)
Adds entry(s) to this search result. |
void |
addEntry(LdapEntry... entry)
Adds an entry to this search result. |
void |
addReference(SearchReference... reference)
Adds a reference to this search result. |
void |
addReferences(Collection<SearchReference> references)
Adds references(s) to this search result. |
void |
clear()
Removes all the entries in this search result. |
boolean |
equals(Object o)
|
Collection<LdapEntry> |
getEntries()
Returns a collection of ldap entry. |
LdapEntry |
getEntry()
Returns a single entry of this result. |
LdapEntry |
getEntry(String dn)
Returns the ldap in this result with the supplied DN. |
String[] |
getEntryDns()
Returns the entry DNs in this result. |
SearchReference |
getReference()
Returns a single search reference of this result. |
Collection<SearchReference> |
getReferences()
Returns a collection of ldap entry. |
int |
hashCode()
|
static SearchResult |
mergeEntries(SearchResult result)
Merges the entries in the supplied result into a single entry. |
void |
removeEntries(Collection<LdapEntry> entries)
Removes the entry(s) from this search result. |
void |
removeEntry(LdapEntry... entry)
Removes an entry from this search result. |
void |
removeEntry(String dn)
Removes the entry with the supplied dn from this search result. |
void |
removeReference(SearchReference... reference)
Removes a reference from this search result. |
void |
removeReferences(Collection<SearchReference> references)
Removes the references(s) from this search result. |
int |
size()
Returns the number of entries in this search result. |
SearchResult |
subResult(int fromIndex,
int toIndex)
Returns a portion of this result between the specified fromIndex, inclusive, and toIndex, exclusive. |
String |
toString()
|
| Methods inherited from class org.ldaptive.AbstractLdapBean |
|---|
getSortBehavior |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SearchResult()
public SearchResult(SortBehavior sb)
sb - sort behavior of the resultspublic SearchResult(LdapEntry... entry)
entry - ldap entrypublic SearchResult(Collection<LdapEntry> entries)
entries - collection of ldap entries| Method Detail |
|---|
public Collection<LdapEntry> getEntries()
public LdapEntry getEntry()
public LdapEntry getEntry(String dn)
dn - of the entry to return
public String[] getEntryDns()
public void addEntry(LdapEntry... entry)
entry - entry to addpublic void addEntries(Collection<LdapEntry> entries)
entries - collection of entries to addpublic void removeEntry(LdapEntry... entry)
entry - entry to removepublic void removeEntry(String dn)
dn - of entry to removepublic void removeEntries(Collection<LdapEntry> entries)
entries - collection of ldap entries to removepublic Collection<SearchReference> getReferences()
public SearchReference getReference()
public void addReference(SearchReference... reference)
reference - reference to addpublic void addReferences(Collection<SearchReference> references)
references - collection of references to addpublic void removeReference(SearchReference... reference)
reference - reference to removepublic void removeReferences(Collection<SearchReference> references)
references - collection of search references to remove
public SearchResult subResult(int fromIndex,
int toIndex)
fromIndex - low endpoint of the search result (inclusive)toIndex - high endpoint of the search result (exclusive)
IndexOutOfBoundsException - for illegal index valuespublic int size()
public void clear()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic static SearchResult mergeEntries(SearchResult result)
result - search result containing entries to merge
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||