public class QueryRequest extends AbstractBceRequest
| Constructor and Description |
|---|
QueryRequest()
Constructs a new QueryRequest object.
|
QueryRequest(String tableName)
Constructs a new QueryRequest object.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAttributesToGet()
Get the attributes to retrieve from the QueryRequest.
|
Key |
getExclusiveStartKey()
Get the primary key(hashkey or hashkey and rangekey) of the first item that this
operation will evaluate.
|
Map<String,AttributeValue> |
getExpressionAttributeValues()
Get the values for the parameters in the the query condition expression for this query request.
|
String |
getKeyConditionExpression()
Get the query condition expression for this query request.
|
int |
getLimit()
Get the maximum number of return query items in one time.
|
String |
getOrder()
Get the order by rangekey for the query items result, in descedning order or in ascending order.
|
String |
getTableName()
Get the name of table for this query items.
|
boolean |
isConsistentRead()
Return true if the consistency is a strongly consistent read; else return false.
|
QueryRequest |
orderByAsc()
Set the query items result in ascending order by rangekey.
|
QueryRequest |
orderByDesc()
Set the query items result in descending order by rangekey.
|
void |
setAttributesToGet(List<String> attributes)
Set the names of attributes to retrieve from the result items.
|
void |
setConsistentRead(boolean consistent)
Set the type of the consistency of a read operation.The default value is false, representing that it is
eventually consistent read.
|
void |
setExclusiveStartKey(Key exclusiveStartKey)
Set the primary key(hashkey or hashkey and rangekey) of the first item that this
operation will evaluate.
|
void |
setExpressionAttributeValues(Map<String,AttributeValue> attributes)
Set the values for the parameters in the the query condition expression for this query request.
|
void |
setKeyConditionExpression(String expression)
Set the query condition expression for this query request.
|
void |
setLimit(int limit)
Set the maximum number of return query items in one time.
|
void |
setOrder(String order)
Set the order by rangekey for the query items result, in descedning order or in ascending order.
|
void |
setTableName(String tableName)
Set the name of table for this query items.
|
String |
toString()
Return a string representation of the object.
|
QueryRequest |
withAttributesToGet(List<String> attributes)
Set the names of attributes to retrieve from the result items.
|
QueryRequest |
withConsistentRead(boolean consistent)
Set the type of the consistency of a read operation.The default value is false, representing that it is
eventually consistent read.
|
QueryRequest |
withExclusiveStartKey(Key exclusiveStartKey)
Set the primary key(hashkey or hashkey and rangekey) of the first item that this
operation will evaluate.
|
QueryRequest |
withExpressionAttributeValues(Map<String,AttributeValue> attributes)
Set the values for the parameters in the the query condition expression for this query request.
|
QueryRequest |
withKeyConditionExpression(String expression)
Set the query condition expression for this query request.
|
QueryRequest |
withLimit(int limit)
Set the maximum number of return query items in one time.
|
QueryRequest |
withOrder(String order)
Set the order by rangekey for the query items result, in descedning order or in ascending order.
|
QueryRequest |
withRequestCredentials(BceCredentials credentials) |
QueryRequest |
withTableName(String tableName)
Set the name of table for this query items.
|
getRequestCredentials, setRequestCredentialspublic QueryRequest()
public QueryRequest(String tableName)
tableName - The name of the table to query.public String getKeyConditionExpression()
public void setKeyConditionExpression(String expression)
expression - The query condition expression for the query request.public QueryRequest withKeyConditionExpression(String expression)
expression - The query condition expression for the query request.public Map<String,AttributeValue> getExpressionAttributeValues()
public void setExpressionAttributeValues(Map<String,AttributeValue> attributes)
attributes - The values and parameters for the query condition expression.public QueryRequest withExpressionAttributeValues(Map<String,AttributeValue> attributes)
attributes - The values and parameters for the query condition expression.public void setTableName(String tableName)
tableName - The name of table for query items.public QueryRequest withTableName(String tableName)
tableName - The name of table for query items.public String getTableName()
public void setConsistentRead(boolean consistent)
consistent - The consistency of a read operation. The default value is false, representing that it is
eventually consistent read. If the value is true, it is a strongly consistent read.public QueryRequest withConsistentRead(boolean consistent)
consistent - The consistency of a read operation. The default value is false, representing that it is
eventually consistent read. If the value is true, it is a strongly consistent read.public boolean isConsistentRead()
public void setOrder(String order)
order - The order by rangekey for the query items result.public QueryRequest withOrder(String order)
public String getOrder()
public QueryRequest orderByDesc()
public QueryRequest orderByAsc()
public void setLimit(int limit)
limit - The maximum number of return query items in one time.public QueryRequest withLimit(int limit)
limit - The maximum number of return query items in one time.public int getLimit()
public List<String> getAttributesToGet()
public void setAttributesToGet(List<String> attributes)
attributes - The names of attributes to retrieve from the result items.public QueryRequest withAttributesToGet(List<String> attributes)
attributes - The names of attributes to retrieve from the result items.public void setExclusiveStartKey(Key exclusiveStartKey)
exclusiveStartKey - The primary key(hashkey or hashkey and rangekey) of the first item that this
operation will evaluate. Use the value that was returned for LastEvaluatedKey in the previous operation.public QueryRequest withExclusiveStartKey(Key exclusiveStartKey)
exclusiveStartKey - The primary key(hashkey or hashkey and rangekey) of the first item that this
operation will evaluate. Use the value that was returned for LastEvaluatedKey
in the previous operation.public Key getExclusiveStartKey()
public String toString()
public QueryRequest withRequestCredentials(BceCredentials credentials)
withRequestCredentials in class AbstractBceRequestCopyright © 2023. All rights reserved.