|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Query<K,T extends Persistent>
A query to a data store to retrieve objects. Queries are constructed by
the DataStore implementation via DataStore.newQuery().
| Method Summary | |
|---|---|
Result<K,T> |
execute()
Executes the Query on the DataStore and returns the results. |
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()
|
void |
setDataStore(DataStore<K,T> dataStore)
Sets the dataStore of this query. |
void |
setEndKey(K endKey)
|
void |
setEndTime(long endTime)
|
void |
setFields(String... fieldNames)
|
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)
|
| Methods inherited from interface org.apache.hadoop.io.Writable |
|---|
readFields, write |
| Methods inherited from interface org.apache.hadoop.conf.Configurable |
|---|
getConf, setConf |
| Method Detail |
|---|
void setDataStore(DataStore<K,T> dataStore)
dataStore - the dataStore of the queryDataStore<K,T> getDataStore()
Result<K,T> execute()
throws IOException
Result for the query.
IOExceptionvoid setFields(String... fieldNames)
String[] getFields()
void setKey(K key)
void setStartKey(K startKey)
startKey - an inclusive start keyvoid setEndKey(K endKey)
endKey - an inclusive end key
void setKeyRange(K startKey,
K endKey)
startKey - an inclusive start keyendKey - an inclusive end keyK getKey()
K getStartKey()
K getEndKey()
void setTimestamp(long timestamp)
void setStartTime(long startTime)
void setEndTime(long endTime)
void setTimeRange(long startTime,
long endTime)
long getTimestamp()
long getStartTime()
long getEndTime()
void setLimit(long limit)
long getLimit()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||