类 Key
- java.lang.Object
-
- com.baidubce.services.moladb.model.Key
-
public class Key extends Object
Represents the Key part for an item. For each Key, it maybe an attribute for hashkey or two attributes for hashkey and rangekey.
-
-
构造器概要
构造器 构造器 说明 Key()Constructs a new Key object.Key(String attributeName, AttributeValue value)Constructs a new Key object.Key(String hashKeyName, AttributeValue hashKeyValue, String rangeKeyName, AttributeValue rangeKeyValue)Constructs a new Key object.Key(Map<String,AttributeValue> attributes)Constructs a new Key object.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Map<String,AttributeValue>getAttributes()Get this object's attribute map with name and value.voidsetAttributes(Map<String,AttributeValue> attributes)Set this object with a given attribute value map.protected Map<String,Object>toJsonObj()StringtoString()Return a string representation of the object.KeywithAttribute(String attributeName, AttributeValue value)The method set attribute name and attribute value with input parameters for a key.KeywithAttributes(Map<String,AttributeValue> attributes)Set this object with a given attribute value map.
-
-
-
构造器详细资料
-
Key
public Key()
Constructs a new Key object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
-
Key
public Key(String attributeName, AttributeValue value)
Constructs a new Key object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- 参数:
attributeName- The attribute name to set for a key.value- The attribute value to set for a key.
-
Key
public Key(String hashKeyName, AttributeValue hashKeyValue, String rangeKeyName, AttributeValue rangeKeyValue)
Constructs a new Key object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- 参数:
hashKeyName- The attribute name to set for a hashKey.hashKeyValue- The attribute value to set for a hashKey.rangeKeyName- The attribute name to set for a rangeKey.rangeKeyValue- The attribute value to set for a rangeKey.
-
Key
public Key(Map<String,AttributeValue> attributes)
Constructs a new Key object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- 参数:
attributes- An attribute map with name and value to set for a key.
-
-
方法详细资料
-
withAttribute
public Key withAttribute(String attributeName, AttributeValue value)
The method set attribute name and attribute value with input parameters for a key. Returns a reference to this object so that method calls can be chained together.- 参数:
attributeName- The attribute name to set for a key.value- The attribute value to set for a key.- 返回:
- A reference to this object so that method calls can be chained together.
-
getAttributes
public Map<String,AttributeValue> getAttributes()
Get this object's attribute map with name and value.- 返回:
- A map of attributes with name and value.
-
setAttributes
public void setAttributes(Map<String,AttributeValue> attributes)
Set this object with a given attribute value map.- 参数:
attributes- An attribute value map to be set for this object.
-
withAttributes
public Key withAttributes(Map<String,AttributeValue> attributes)
Set this object with a given attribute value map.- 参数:
attributes- An attribute value map to be set for this object.- 返回:
- A reference to this object so that method calls can be chained together.
-
toString
public String toString()
Return a string representation of the object.
-
-