类 KeysAndAttributes
- java.lang.Object
-
- com.baidubce.services.moladb.model.KeysAndAttributes
-
public class KeysAndAttributes extends Object
Represents a set of keys and, for each key, the attributes to retrieve from the table.
-
-
构造器概要
构造器 构造器 说明 KeysAndAttributes()Constructs a new KeysAndAttributes object.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 List<String>getAttributesToGet()Get all of the attributes to retrieve from a table.List<Key>getKeys()Get the key attributes the define the items and the attributes associated with the items in this object.booleanisConsistentRead()Return true if the consistency is a strongly consistent read; else return false.voidsetAttributesToGet(List<String> attributes)Attributes to retrieve from the table.voidsetConsistentRead(boolean consistentRead)Set the type of the consistency of a read operation.The default value is false, representing that it is eventually consistent read.voidsetKeys(List<Key> keys)Set the list of Keys to get associated items.protected Map<String,Object>toJsonObj()StringtoString()Return a string representation of the object.KeysAndAttributeswithAttributesToGet(List<String> attributes)Attributes to retrieve from the table.KeysAndAttributeswithConsistentRead(boolean consistentRead)Set the type of the consistency of a read operation.The default value is false, representing that it is eventually consistent read.KeysAndAttributeswithKeys(List<Key> keys)Set the list of Keys to get associated items.
-
-
-
方法详细资料
-
withKeys
public KeysAndAttributes withKeys(List<Key> keys)
Set the list of Keys to get associated items.- 参数:
keys- The key attributes and values to get items from a table.- 返回:
- Returns a reference to this object so that method calls can be chained together.
-
setKeys
public void setKeys(List<Key> keys)
Set the list of Keys to get associated items.- 参数:
keys- The key attributes and values to get items from a table.- 抛出:
IllegalArgumentException- if the list is empty.
-
setConsistentRead
public void setConsistentRead(boolean consistentRead)
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.- 参数:
consistentRead- 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 KeysAndAttributes withConsistentRead(boolean consistentRead)
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.- 参数:
consistentRead- 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.
-
withAttributesToGet
public KeysAndAttributes withAttributesToGet(List<String> attributes)
Attributes to retrieve from the table.- 参数:
attributes- The attributes to retrieve from an item.- 返回:
- Returns a reference to this object so that method calls can be chained together.
-
setAttributesToGet
public void setAttributesToGet(List<String> attributes)
Attributes to retrieve from the table.- 参数:
attributes- The attributes to retrieve from an item.
-
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.
-
getAttributesToGet
public List<String> getAttributesToGet()
Get all of the attributes to retrieve from a table.- 返回:
- All of the attributes to retrieve from a table.
-
getKeys
public List<Key> getKeys()
Get the key attributes the define the items and the attributes associated with the items in this object.- 返回:
- A list of Key with key attributes and theirs attribute values.
-
-