Atavism Version 2018.1AGIS API

atavism.server.engine
Class SearchSelection

java.lang.Object
  extended by atavism.server.engine.SearchSelection

public class SearchSelection
extends java.lang.Object

Select information to return from an object search. Information is selected by bit-flags and/or property names. The supported technique varies with each Searchable collection.

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:

How these options are supported, if at all, is defined by each searchable collection.


Field Summary
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 Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESULT_KEYED

public static final int RESULT_KEYED
Format results as a collection of SearchEntry objects.

See Also:
Constant Field Values

RESULT_KEY_ONLY

public static final int RESULT_KEY_ONLY
Format results as a collection of object keys or names.

See Also:
Constant Field Values
Constructor Detail

SearchSelection

public SearchSelection()

SearchSelection

public SearchSelection(long propFlags)
Select information by bit-flag.


SearchSelection

public SearchSelection(long propFlags,
                       int resultOption)
Select information by bit-flag and format results according to given option.


SearchSelection

public SearchSelection(java.util.List<java.lang.String> properties)
Select information by property names.


SearchSelection

public SearchSelection(java.util.List<java.lang.String> properties,
                       int resultOption)
Select information by property names and format results according to given option.

Method Detail

getResultOption

public int getResultOption()
Get the result formatting option.


setResultOption

public void setResultOption(int option)
Set the result formatting option.

Parameters:
option - One of RESULT_KEYED or RESULT_KEY_ONLY.

getProperties

public java.util.List<java.lang.String> getProperties()
Get the selected property names.


setProperties

public void setProperties(java.util.List<java.lang.String> props)
Set the selected property names.


addProperty

public void addProperty(java.lang.String property)
Add a selected property.


removeProperty

public void removeProperty(java.lang.String property)
Remove a selected property.


getAllProperties

public boolean getAllProperties()
Return get-all-properties flag.


setAllProperties

public void setAllProperties(boolean selectAllProperties)
Set get-all-properties flag.


getPropFlags

public long getPropFlags()
Get property selection bitmask.


setPropFlags

public void setPropFlags(long flags)
Set property selection bitmask.


addPropFlag

public void addPropFlag(long flag)
Add property selection.


removePropFlag

public void removePropFlag(long flag)
Remove property selection.



Copyright © 2018 Dragonsan Studios Sp. z o.o.