public class SearchResult extends AbstractLdapBean
Modifier and Type | Field and Description |
---|---|
private static int |
HASH_CODE_SEED
hash code seed.
|
private Map<String,LdapEntry> |
resultEntries
Entries contained in this result.
|
private Collection<SearchReference> |
searchReferences
References contained in this result.
|
private static long |
serialVersionUID
serial version uid.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
getSortBehavior
private static final int HASH_CODE_SEED
private static final long serialVersionUID
private final Collection<SearchReference> searchReferences
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 entriespublic Collection<LdapEntry> getEntries()
public LdapEntry getEntry()
public LdapEntry getEntry(String dn)
dn
- of the entry to returnpublic 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 removepublic 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 static SearchResult mergeEntries(SearchResult result)
result
- search result containing entries to mergeCopyright © 2003-2019 Virginia Tech. All Rights Reserved.