public class CustomSearchResult extends Object implements Comparable<CustomSearchResult>
Constructor and Description |
---|
CustomSearchResult(SearchResult sr,
String baseDN)
Constructor of a search result using a SearchResult as basis.
|
CustomSearchResult(String dn)
Constructor of an empty search result.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CustomSearchResult o) |
CustomSearchResult |
duplicate()
Return a new object, copy of the current object.
|
boolean |
equals(Object o) |
SortedSet<String> |
getAttributeNames()
Returns all the attribute names of the entry.
|
List<Object> |
getAttributeValues(String name)
Returns the values for a given attribute.
|
String |
getDN()
Returns the DN of the entry.
|
Entry |
getEntry()
Gets the Entry object equivalent to this CustomSearchResult.
|
int |
hashCode() |
void |
set(String attrName,
List<Object> values)
Sets the values for a given attribute name.
|
String |
toString() |
public CustomSearchResult(String dn)
dn
- the dn of the entry.public CustomSearchResult(SearchResult sr, String baseDN) throws NamingException
sr
- the SearchResult.baseDN
- the base DN of the search that returned the SearchResult.NamingException
- if there is an error retrieving the attribute
values.public List<Object> getAttributeValues(String name)
name
- the name of the attribute.public SortedSet<String> getAttributeNames()
public int compareTo(CustomSearchResult o)
compareTo
in interface Comparable<CustomSearchResult>
public CustomSearchResult duplicate()
public void set(String attrName, List<Object> values)
attrName
- the name of the attribute.values
- the values for the attribute.public Entry getEntry() throws OpenDsException
OpenDsException
- if there is an error parsing the DN or retrieving
the attributes definition and objectclasses in the schema of the server.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.