org.hypergraphdb.query.impl
Class KeyBasedQuery

java.lang.Object
  extended by org.hypergraphdb.HGQuery
      extended by org.hypergraphdb.query.impl.KeyBasedQuery
All Implemented Interfaces:
HGGraphHolder
Direct Known Subclasses:
DefaultKeyBasedQuery, SearchableBasedQuery

public abstract class KeyBasedQuery
extends HGQuery

A KeyBasedQuery is a HGQuery that produces a result based on a single key value. A query implementation that supports this interface allows the client to set a different key and execute the query possibly multiple times, in order to obtain a different result.

Author:
Borislav Iordanov

Nested Class Summary
 
Nested classes/interfaces inherited from class org.hypergraphdb.HGQuery
HGQuery.hg
 
Field Summary
 
Fields inherited from class org.hypergraphdb.HGQuery
NOP
 
Constructor Summary
KeyBasedQuery()
           
 
Method Summary
abstract  java.lang.Object getKey()
          Retrieve the key object used to perform this query.
abstract  void setKey(java.lang.Object key)
          Specify the key on which this query operates.
 
Methods inherited from class org.hypergraphdb.HGQuery
execute, getHyperGraph, make, setHyperGraph
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyBasedQuery

public KeyBasedQuery()
Method Detail

setKey

public abstract void setKey(java.lang.Object key)

Specify the key on which this query operates.

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 abstract java.lang.Object getKey()

Retrieve the key object used to perform this query.