public class SearchSelection
extends java.lang.Object
In addition, the form of the search results can be specified. By default, searches should return a collection of matching objects. Two additional options are supported:
RESULT_KEYED
- Result is a collection of SearchEntry
objects. The SearchEntry key is the object key or
name and the value is the object itself.
RESULT_KEY_ONLY
- The result is a collection of object keys or names.
Modifier and Type | Field and Description |
---|---|
static int |
RESULT_KEY_ONLY
Format results as a collection of object keys or names.
|
static int |
RESULT_KEYED
Format results as a collection of
SearchEntry objects. |
Constructor and Description |
---|
SearchSelection() |
SearchSelection(java.util.List<java.lang.String> properties)
Select information by property names.
|
SearchSelection(java.util.List<java.lang.String> properties,
int resultOption)
Select information by property names and format results according to
given option.
|
SearchSelection(long propFlags)
Select information by bit-flag.
|
SearchSelection(long propFlags,
int resultOption)
Select information by bit-flag and format results according to
given option.
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(java.lang.String property)
Add a selected property.
|
void |
addPropFlag(long flag)
Add property selection.
|
boolean |
getAllProperties()
Return get-all-properties flag.
|
java.util.List<java.lang.String> |
getProperties()
Get the selected property names.
|
long |
getPropFlags()
Get property selection bitmask.
|
int |
getResultOption()
Get the result formatting option.
|
void |
removeProperty(java.lang.String property)
Remove a selected property.
|
void |
removePropFlag(long flag)
Remove property selection.
|
void |
setAllProperties(boolean selectAllProperties)
Set get-all-properties flag.
|
void |
setProperties(java.util.List<java.lang.String> props)
Set the selected property names.
|
void |
setPropFlags(long flags)
Set property selection bitmask.
|
void |
setResultOption(int option)
Set the result formatting option.
|
public static final int RESULT_KEYED
SearchEntry
objects.public static final int RESULT_KEY_ONLY
public SearchSelection()
public SearchSelection(long propFlags)
public SearchSelection(long propFlags, int resultOption)
public SearchSelection(java.util.List<java.lang.String> properties)
public SearchSelection(java.util.List<java.lang.String> properties, int resultOption)
public int getResultOption()
public void setResultOption(int option)
option
- One of RESULT_KEYED
or RESULT_KEY_ONLY
.public java.util.List<java.lang.String> getProperties()
public void setProperties(java.util.List<java.lang.String> props)
public void addProperty(java.lang.String property)
public void removeProperty(java.lang.String property)
public boolean getAllProperties()
public void setAllProperties(boolean selectAllProperties)
public long getPropFlags()
public void setPropFlags(long flags)
public void addPropFlag(long flag)
public void removePropFlag(long flag)