类 QueryRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.moladb.model.QueryRequest
-
public class QueryRequest extends AbstractBceRequest
Represents the input of a Query operation.
-
-
构造器概要
构造器 构造器 说明 QueryRequest()Constructs a new QueryRequest object.QueryRequest(String tableName)Constructs a new QueryRequest object.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 List<String>getAttributesToGet()Get the attributes to retrieve from the QueryRequest.KeygetExclusiveStartKey()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.StringgetKeyConditionExpression()Get the query condition expression for this query request.intgetLimit()Get the maximum number of return query items in one time.StringgetOrder()Get the order by rangekey for the query items result, in descedning order or in ascending order.StringgetTableName()Get the name of table for this query items.booleanisConsistentRead()Return true if the consistency is a strongly consistent read; else return false.QueryRequestorderByAsc()Set the query items result in ascending order by rangekey.QueryRequestorderByDesc()Set the query items result in descending order by rangekey.voidsetAttributesToGet(List<String> attributes)Set the names of attributes to retrieve from the result items.voidsetConsistentRead(boolean consistent)Set the type of the consistency of a read operation.The default value is false, representing that it is eventually consistent read.voidsetExclusiveStartKey(Key exclusiveStartKey)Set the primary key(hashkey or hashkey and rangekey) of the first item that this operation will evaluate.voidsetExpressionAttributeValues(Map<String,AttributeValue> attributes)Set the values for the parameters in the the query condition expression for this query request.voidsetKeyConditionExpression(String expression)Set the query condition expression for this query request.voidsetLimit(int limit)Set the maximum number of return query items in one time.voidsetOrder(String order)Set the order by rangekey for the query items result, in descedning order or in ascending order.voidsetTableName(String tableName)Set the name of table for this query items.StringtoString()Return a string representation of the object.QueryRequestwithAttributesToGet(List<String> attributes)Set the names of attributes to retrieve from the result items.QueryRequestwithConsistentRead(boolean consistent)Set the type of the consistency of a read operation.The default value is false, representing that it is eventually consistent read.QueryRequestwithExclusiveStartKey(Key exclusiveStartKey)Set the primary key(hashkey or hashkey and rangekey) of the first item that this operation will evaluate.QueryRequestwithExpressionAttributeValues(Map<String,AttributeValue> attributes)Set the values for the parameters in the the query condition expression for this query request.QueryRequestwithKeyConditionExpression(String expression)Set the query condition expression for this query request.QueryRequestwithLimit(int limit)Set the maximum number of return query items in one time.QueryRequestwithOrder(String order)Set the order by rangekey for the query items result, in descedning order or in ascending order.QueryRequestwithRequestCredentials(BceCredentials credentials)QueryRequestwithTableName(String tableName)Set the name of table for this query items.-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
构造器详细资料
-
QueryRequest
public QueryRequest()
Constructs a new QueryRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
-
QueryRequest
public QueryRequest(String tableName)
Constructs a new QueryRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- 参数:
tableName- The name of the table to query.
-
-
方法详细资料
-
getKeyConditionExpression
public String getKeyConditionExpression()
Get the query condition expression for this query request.- 返回:
- The query condition expression for the query request.
-
setKeyConditionExpression
public void setKeyConditionExpression(String expression)
Set the query condition expression for this query request.- 参数:
expression- The query condition expression for the query request.
-
withKeyConditionExpression
public QueryRequest withKeyConditionExpression(String expression)
Set the query condition expression for this query request.- 参数:
expression- The query condition expression for the query request.- 返回:
- A reference to this object so that method calls can be chained together.
-
getExpressionAttributeValues
public Map<String,AttributeValue> getExpressionAttributeValues()
Get the values for the parameters in the the query condition expression for this query request.- 返回:
- The values and parameters for the query condition expression.
-
setExpressionAttributeValues
public void setExpressionAttributeValues(Map<String,AttributeValue> attributes)
Set the values for the parameters in the the query condition expression for this query request.- 参数:
attributes- The values and parameters for the query condition expression.
-
withExpressionAttributeValues
public QueryRequest withExpressionAttributeValues(Map<String,AttributeValue> attributes)
Set the values for the parameters in the the query condition expression for this query request.- 参数:
attributes- The values and parameters for the query condition expression.- 返回:
- A reference to this object so that method calls can be chained together.
-
setTableName
public void setTableName(String tableName)
Set the name of table for this query items.- 参数:
tableName- The name of table for query items.
-
withTableName
public QueryRequest withTableName(String tableName)
Set the name of table for this query items.- 参数:
tableName- The name of table for query items.- 返回:
- A reference to this object so that method calls can be chained together.
-
getTableName
public String getTableName()
Get the name of table for this query items.- 返回:
- The name of table for query items.
-
setConsistentRead
public 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. If the value is true, it is a strongly consistent read.- 参数:
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.
-
withConsistentRead
public 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. If the value is true, it is a strongly consistent read.- 参数:
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.- 返回:
- A reference to this object so that method calls can be chained together.
-
isConsistentRead
public boolean isConsistentRead()
Return true if the consistency is a strongly consistent read; else return false.- 返回:
- 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.
-
setOrder
public void setOrder(String order)
Set the order by rangekey for the query items result, in descedning order or in ascending order.- 参数:
order- The order by rangekey for the query items result.
-
withOrder
public QueryRequest withOrder(String order)
Set the order by rangekey for the query items result, in descedning order or in ascending order.- 返回:
- A reference to this object so that method calls can be chained together.
-
getOrder
public String getOrder()
Get the order by rangekey for the query items result, in descedning order or in ascending order.- 返回:
- The ordre by rangekey for the query items result.
-
orderByDesc
public QueryRequest orderByDesc()
Set the query items result in descending order by rangekey.- 返回:
- A reference to this object so that method calls can be chained together.
-
orderByAsc
public QueryRequest orderByAsc()
Set the query items result in ascending order by rangekey.- 返回:
- A reference to this object so that method calls can be chained together.
-
setLimit
public void setLimit(int limit)
Set the maximum number of return query items in one time.- 参数:
limit- The maximum number of return query items in one time.
-
withLimit
public QueryRequest withLimit(int limit)
Set the maximum number of return query items in one time.- 参数:
limit- The maximum number of return query items in one time.- 返回:
- A reference to this object so that method calls can be chained together.
-
getLimit
public int getLimit()
Get the maximum number of return query items in one time.- 返回:
- The maximum number of return query items in one time.
-
getAttributesToGet
public List<String> getAttributesToGet()
Get the attributes to retrieve from the QueryRequest.- 返回:
- The attributes to retrieve from the QueryRequest.
-
setAttributesToGet
public void setAttributesToGet(List<String> attributes)
Set the names of attributes to retrieve from the result items.- 参数:
attributes- The names of attributes to retrieve from the result items.
-
withAttributesToGet
public QueryRequest withAttributesToGet(List<String> attributes)
Set the names of attributes to retrieve from the result items.- 参数:
attributes- The names of attributes to retrieve from the result items.- 返回:
- A reference to this object so that method calls can be chained together.
-
setExclusiveStartKey
public void setExclusiveStartKey(Key exclusiveStartKey)
Set 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.- 参数:
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.
-
withExclusiveStartKey
public QueryRequest withExclusiveStartKey(Key exclusiveStartKey)
Set 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.- 参数:
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.- 返回:
- A reference to this object so that method calls can be chained together.
-
getExclusiveStartKey
public Key getExclusiveStartKey()
Get 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.- 返回:
- 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.
-
toString
public String toString()
Return a string representation of the object.
-
withRequestCredentials
public QueryRequest withRequestCredentials(BceCredentials credentials)
- 指定者:
withRequestCredentials在类中AbstractBceRequest
-
-