| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.gora.query.impl.QueryBase<K,T>
public abstract class QueryBase<K,T extends Persistent>
Base class for Query implementations.
| Field Summary | |
|---|---|
| protected  DataStore<K,T> | dataStore | 
| protected  K | endKey | 
| protected  long | endTime | 
| protected  String[] | fields | 
| protected  String | filter | 
| protected  boolean | isCompiled | 
| protected  long | limit | 
| protected  String | queryString | 
| protected  K | startKey | 
| protected  long | startTime | 
| Constructor Summary | |
|---|---|
| QueryBase(DataStore<K,T> dataStore) | |
| Method Summary | |
|---|---|
|  boolean | equals(Object obj) | 
|  Result<K,T> | execute()Executes the Query on the DataStore and returns the results. | 
|  org.apache.hadoop.conf.Configuration | getConf() | 
|  DataStore<K,T> | getDataStore()Returns the DataStore, that this Query is associated with. | 
|  K | getEndKey() | 
|  long | getEndTime() | 
|  String[] | getFields() | 
|  K | getKey() | 
|  long | getLimit()Returns the maximum number of results | 
|  K | getStartKey() | 
|  long | getStartTime() | 
|  long | getTimestamp() | 
|  int | hashCode() | 
|  void | readFields(DataInput in) | 
|  void | setConf(org.apache.hadoop.conf.Configuration conf) | 
|  void | setDataStore(DataStore<K,T> dataStore)Sets the dataStore of this query. | 
|  void | setEndKey(K endKey) | 
|  void | setEndTime(long endTime) | 
|  void | setFields(String... fields) | 
|  void | setKey(K key) | 
|  void | setKeyRange(K startKey,
            K endKey)Set the range of keys over which the query will execute. | 
|  void | setLimit(long limit)Sets the maximum number of results to return. | 
|  void | setStartKey(K startKey) | 
|  void | setStartTime(long startTime) | 
|  void | setTimeRange(long startTime,
             long endTime) | 
|  void | setTimestamp(long timestamp) | 
|  String | toString() | 
|  void | write(DataOutput out) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected DataStore<K,T extends Persistent> dataStore
protected String queryString
protected String[] fields
protected K startKey
protected K endKey
protected long startTime
protected long endTime
protected String filter
protected long limit
protected boolean isCompiled
| Constructor Detail | 
|---|
public QueryBase(DataStore<K,T> dataStore)
| Method Detail | 
|---|
public Result<K,T> execute()
                                       throws IOException
Query
execute in interface Query<K,T extends Persistent>Result for the query.
IOExceptionpublic void setDataStore(DataStore<K,T> dataStore)
Query
setDataStore in interface Query<K,T extends Persistent>dataStore - the dataStore of the querypublic DataStore<K,T> getDataStore()
Query
getDataStore in interface Query<K,T extends Persistent>public void setFields(String... fields)
setFields in interface Query<K,T extends Persistent>public String[] getFields()
getFields in interface Query<K,T extends Persistent>public void setKey(K key)
setKey in interface Query<K,T extends Persistent>public void setStartKey(K startKey)
setStartKey in interface Query<K,T extends Persistent>startKey - an inclusive start keypublic void setEndKey(K endKey)
setEndKey in interface Query<K,T extends Persistent>endKey - an inclusive end key
public void setKeyRange(K startKey,
                        K endKey)
Query
setKeyRange in interface Query<K,T extends Persistent>startKey - an inclusive start keyendKey - an inclusive end keypublic K getKey()
getKey in interface Query<K,T extends Persistent>public K getStartKey()
getStartKey in interface Query<K,T extends Persistent>public K getEndKey()
getEndKey in interface Query<K,T extends Persistent>public void setTimestamp(long timestamp)
setTimestamp in interface Query<K,T extends Persistent>public void setStartTime(long startTime)
setStartTime in interface Query<K,T extends Persistent>public void setEndTime(long endTime)
setEndTime in interface Query<K,T extends Persistent>
public void setTimeRange(long startTime,
                         long endTime)
setTimeRange in interface Query<K,T extends Persistent>public long getTimestamp()
getTimestamp in interface Query<K,T extends Persistent>public long getStartTime()
getStartTime in interface Query<K,T extends Persistent>public long getEndTime()
getEndTime in interface Query<K,T extends Persistent>public void setLimit(long limit)
Query
setLimit in interface Query<K,T extends Persistent>public long getLimit()
Query
getLimit in interface Query<K,T extends Persistent>public org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurable
public void readFields(DataInput in)
                throws IOException
readFields in interface org.apache.hadoop.io.WritableIOException
public void write(DataOutput out)
           throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||