T
- type of backing mappublic abstract class AbstractLdapResult<T extends Map<String,LdapEntry>> extends AbstractLdapBean implements LdapResult
AbstractLdapResult
provides a base implementation of
LdapResult
where the underlying entries are backed by a
Map
.Modifier and Type | Field and Description |
---|---|
protected T |
entries
Entries contained in this result.
|
protected static int |
HASH_CODE_SEED
hash code seed.
|
beanFactory, logger
Constructor and Description |
---|
AbstractLdapResult(LdapBeanFactory lbf)
Creates a new
AbstractLdapResult with the supplied ldap bean
factory. |
Modifier and Type | Method and Description |
---|---|
void |
addEntries(Collection<LdapEntry> c)
This adds a
Collection of entries to this
LdapResult . |
void |
addEntries(Iterator<SearchResult> i)
This adds an
Iterator of SearchResult to this
LdapResult . |
void |
addEntries(NamingEnumeration<SearchResult> ne)
This adds a
NamingEnumeration of SearchResult to
this LdapResult . |
void |
addEntry(LdapEntry e)
This adds a new entry to this
LdapResult . |
void |
addEntry(SearchResult sr)
This adds a new entry to this
LdapResult . |
void |
clear()
This removes all entries from this
LdapResult . |
Collection<LdapEntry> |
getEntries()
This returns a
Collection of LdapEntry for this
LdapResult . |
LdapEntry |
getEntry(String dn)
This returns the
LdapEntry for this LdapResult
with the supplied DN. |
int |
hashCode()
This returns the hash code for this object.
|
int |
size()
This returns the number of entries in this result.
|
List<SearchResult> |
toSearchResults()
This returns a
List of SearchResult that
represent the entries in this LdapResult . |
String |
toString()
This returns a string representation of this object.
|
equals
protected static final int HASH_CODE_SEED
public AbstractLdapResult(LdapBeanFactory lbf)
AbstractLdapResult
with the supplied ldap bean
factory.lbf
- LdapBeanFactory
public Collection<LdapEntry> getEntries()
Collection
of LdapEntry
for this
LdapResult
.getEntries
in interface LdapResult
Collection
public LdapEntry getEntry(String dn)
LdapEntry
for this LdapResult
with the supplied DN.getEntry
in interface LdapResult
dn
- String
LdapEntry
public void addEntry(LdapEntry e)
LdapResult
.addEntry
in interface LdapResult
e
- LdapEntry
public void addEntry(SearchResult sr) throws NamingException
LdapResult
.addEntry
in interface LdapResult
sr
- SearchResult
NamingException
- if the search results cannot be readpublic void addEntries(Collection<LdapEntry> c)
Collection
of entries to this
LdapResult
. The list should contain LdapEntry
objects.addEntries
in interface LdapResult
c
- Collection
public void addEntries(NamingEnumeration<SearchResult> ne) throws NamingException
NamingEnumeration
of SearchResult
to
this LdapResult
.addEntries
in interface LdapResult
ne
- NamingEnumeration
NamingException
- if the search results cannot be readpublic void addEntries(Iterator<SearchResult> i) throws NamingException
Iterator
of SearchResult
to this
LdapResult
.addEntries
in interface LdapResult
i
- Iterator
NamingException
- if the search results cannot be readpublic int size()
size
in interface LdapResult
int
public void clear()
LdapResult
.clear
in interface LdapResult
public int hashCode()
hashCode
in class AbstractLdapBean
int
public String toString()
public List<SearchResult> toSearchResults()
List
of SearchResult
that
represent the entries in this LdapResult
.toSearchResults
in interface LdapResult
List
Copyright © 2016. All rights reserved.