org.hypergraphdb.query.impl
Class SearchableBasedQuery
java.lang.Object
org.hypergraphdb.HGQuery
org.hypergraphdb.query.impl.KeyBasedQuery
org.hypergraphdb.query.impl.SearchableBasedQuery
- All Implemented Interfaces:
- HGGraphHolder
public class SearchableBasedQuery
- extends KeyBasedQuery
A simple query that operates on a single HGSearchable entity, usually
a HGIndex.
- Author:
- Borislav Iordanov
| Fields inherited from class org.hypergraphdb.HGQuery |
NOP |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchableBasedQuery
public SearchableBasedQuery(HGSearchable searchable,
java.lang.Object key,
ComparisonOperator operator)
Construct a new HGSearchable based query.
- Parameters:
searchable - The instance that will be searched.key - The search key.operator - A ComparisonOperator for the search. If it is
something else than a ComparisonOperator.EQ operator, it must be
supported by the concrete HGSearchable object passed. For instance,
an order operator like ComparisonOperator.LT and the like requires
a HGOrderedSearchable instance.
execute
public HGSearchResult execute()
- Specified by:
execute in class HGQuery
setKey
public void setKey(java.lang.Object key)
- Description copied from class:
KeyBasedQuery
Specify the key on which this query operates.
- Specified by:
setKey in class KeyBasedQuery
- Parameters:
key - The key object. The value may be interpreted differently
based on the concrete HGQuery instance. Usually it
should be either a byte [] or convertible to one.
getKey
public java.lang.Object getKey()
- Description copied from class:
KeyBasedQuery
Retrieve the key object used to perform this query.
- Specified by:
getKey in class KeyBasedQuery
setOperator
public void setOperator(ComparisonOperator operator)
getOperator
public ComparisonOperator getOperator()
setSearchable
public void setSearchable(HGSearchable searchable)
getSearchable
public HGSearchable getSearchable()