A SearchResult instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single SearchResult instance should lock the object.
DirContext#search
| Modifier and Type | Field and Description |
|---|---|
| private Attributes | attrs
Contains the attributes returned with the object. |
| private static final long | serialVersionUID
Use serialVersionUID from JNDI 1.1.1 for interoperability
|
| Access | Constructor and Description |
|---|---|
| public | SearchResult(String
The non-null name of the search item. It is relative
to the target context of the search (which is
named by the first parameter of the name, Object search() method)The object bound to name. Can be null. obj, Attributes The attributes that were requested to be returned with
this search item. Cannot be null. attrs)Constructs a search result using the result's name, its bound object, and its attributes. |
| public | SearchResult(String
The non-null name of the search item. name, Object The object bound to name. Can be null. obj, Attributes The attributes that were requested to be returned with
this search item. Cannot be null. attrs, boolean true if isRelative)name is relative
to the target context of the search (which is named by
the first parameter of the search() method);
false if name is a URL string.Constructs a search result using the result's name, its bound object, and its attributes, and whether the name is relative. |
| public | SearchResult(String
The non-null name of the search item. It is relative
to the target context of the search (which is
named by the first parameter of the name, String search() method)The possibly null class name of the object
bound to className, Object name. If null, the class name of obj is
returned by getClassName(). If obj is also null,
getClassName() will return null.The object bound to name. Can be null. obj, Attributes The attributes that were requested to be returned with
this search item. Cannot be null. attrs)Constructs a search result using the result's name, its class name, its bound object, and its attributes. |
| public | SearchResult(String
The non-null name of the search item. name, String The possibly null class name of the object
bound to className, Object name. If null, the class name of obj is
returned by getClassName(). If obj is also null,
getClassName() will return null.The object bound to name. Can be null. obj, Attributes The attributes that were requested to be returned with
this search item. Cannot be null. attrs, boolean true if isRelative)name is relative
to the target context of the search (which is named by
the first parameter of the search() method);
false if name is a URL string.Constructs a search result using the result's name, its class name, its bound object, its attributes, and whether the name is relative. |
| Modifier and Type | Method and Description |
|---|---|
| public Attributes | Returns: The non-null attributes in this search result. Can be empty.Retrieves the attributes in this search result. |
| public void | setAttributes(Attributes
The non-null attributes to use. Can be empty. attrs)Sets the attributes of this search result to |
| public String | Returns: The string representation of this SearchResult. Cannot be null.Overrides javax. Generates the string representation of this SearchResult. |
| attrs | back to summary |
|---|---|
| private Attributes attrs Contains the attributes returned with the object. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides javax. Use serialVersionUID from JNDI 1.1.1 for interoperability | |
| SearchResult | back to summary |
|---|---|
| public SearchResult(String name, Object obj, Attributes attrs) Constructs a search result using the result's name, its bound object, and its attributes.
| |
| SearchResult | back to summary |
|---|---|
| public SearchResult(String name, Object obj, Attributes attrs, boolean isRelative) Constructs a search result using the result's name, its bound object, and its attributes, and whether the name is relative.
| |
| SearchResult | back to summary |
|---|---|
| public SearchResult(String name, String className, Object obj, Attributes attrs) Constructs a search result using the result's name, its class name, its bound object, and its attributes.
| |
| SearchResult | back to summary |
|---|---|
| public SearchResult(String name, String className, Object obj, Attributes attrs, boolean isRelative) Constructs a search result using the result's name, its class name, its bound object, its attributes, and whether the name is relative.
| |
| getAttributes | back to summary |
|---|---|
| public Attributes getAttributes() Retrieves the attributes in this search result.
| |
| setAttributes | back to summary |
|---|---|
| public void setAttributes(Attributes attrs) Sets the attributes of this search result to
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides javax. Generates the string representation of this SearchResult. The string representation consists of the string representation of the binding and the string representation of this search result's attributes, separated by ':'. The contents of this string is useful for debugging and is not meant to be interpreted programmatically.
| |