public abstract class QueryWSBase<K,T extends Persistent> extends Object implements Query<K,T>
Modifier and Type | Field and Description |
---|---|
protected DataStore<K,T> |
dataStore
Data store used for this query
|
protected K |
endKey |
protected long |
endTime |
protected String[] |
fields
Fields to be retrieved
|
protected Filter<K,T> |
filter |
protected boolean |
isCompiled
Flag to determine whether a query is compiled or not
|
protected long |
limit
Max number of results to be retrieved
|
protected boolean |
localFilterEnabled |
protected String |
queryString
Query represented in a string
|
protected K |
startKey
Range key parameters
|
protected long |
startTime
Query time parameters
|
Constructor and Description |
---|
QueryWSBase(DataStore<K,T> dataStore)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Result<K,T> |
execute()
Executes the Query on the DataStore and returns the results.
|
Object |
getConf()
Gets the configuration object
|
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 |
setConf(Object auth)
Sets the configuration object
|
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() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFilter, isLocalFilterEnabled, setFilter, setLocalFilterEnabled
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 Filter<K,T extends Persistent> filter
protected boolean localFilterEnabled
protected long limit
protected boolean isCompiled
public Result<K,T> execute()
Query
public 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 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 keypublic 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 getStartKey()
getStartKey
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 Object getConf()
public void setConf(Object auth)
auth
- Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.