## com.baidubce.services.moladb.model
Class 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.

Constructor Summary
`QueryRequest()` Constructs a new QueryRequest object.
`QueryRequest(String tableName)` Constructs a new QueryRequest object.

Method Summary
`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.

Methods inherited from class com.baidubce.model.AbstractBceRequest
`getRequestCredentials, setRequestCredentials`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### 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.

  Parameters:
    `tableName` - The name of the table to query.

Method Detail

### getKeyConditionExpression

    public String getKeyConditionExpression()

  Get the query condition expression for this query request.

  Returns:
    The query condition expression for the query request.

### setKeyConditionExpression

    public void setKeyConditionExpression(String expression)

  Set the query condition expression for this query request.

  Parameters:
    `expression` - The query condition expression for the query request.

### withKeyConditionExpression

    public QueryRequest withKeyConditionExpression(String expression)

  Set the query condition expression for this query request.

  Parameters:
    `expression` - The query condition expression for the query request.
  Returns:
    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.

  Returns:
    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.

  Parameters:
    `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.

  Parameters:
    `attributes` - The values and parameters for the query condition expression.
  Returns:
    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.

  Parameters:
    `tableName` - The name of table for query items.

### withTableName

    public QueryRequest withTableName(String tableName)

  Set the name of table for this query items.

  Parameters:
    `tableName` - The name of table for query items.
  Returns:
    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.

  Parameters:
    `tableName` - 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.

  Parameters:
    `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.

  Parameters:
    `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.
  Returns:
    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.

  Returns:
    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.

  Parameters:
    `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.

  Returns:
    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.

  Returns:
    The ordre by rangekey for the query items result.

### orderByDesc

    public QueryRequest orderByDesc()

  Set the query items result in descending order by rangekey.

  Returns:
    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.

  Returns:
    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.

  Parameters:
    `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.

  Parameters:
    `limit` - The maximum number of return query items in one time.
  Returns:
    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.

  Returns:
    The maximum number of return query items in one time.

### getAttributesToGet

    public List<String> getAttributesToGet()

  Get the attributes to retrieve from the QueryRequest.

  Returns:
    The attributes to retrieve from the QueryRequest, the type is List<String>.

### setAttributesToGet

    public void setAttributesToGet(List<String> attributes)

  Set the names of attributes to retrieve from the result items.

  Parameters:
    `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.

  Parameters:
    `attributes` - The names of attributes to retrieve from the result items, the type is List<String>.
  Returns:
    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.

  Parameters:
    `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.

  Parameters:
    `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.
  Returns:
    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.

  Returns:
    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.

  Overrides:
    `toString` in class `Object`
  Returns:
    A string representation of the object.

### withRequestCredentials

    public QueryRequest withRequestCredentials(BceCredentials credentials)

  Specified by:
    `withRequestCredentials` in class `AbstractBceRequest`

Copyright © 2016. All rights reserved.