类 QueryRequest


  • public class QueryRequest
    extends AbstractBceRequest
    Represents the input of a Query operation.
    • 构造器详细资料

      • 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.
        覆盖:
        toString 在类中 Object
        返回:
        A string representation of the object.