Class AttributeValue
- All Implemented Interfaces:
Serializable, Cloneable
Represents the data for an attribute. You can set one, and only one, of the elements.
Each attribute in an item is a name-value pair. An attribute can be single-valued or multi-valued set. For example, a book item can have title and authors attributes. Each book has one title but can have many authors. The multi-valued attribute is a set; duplicate values are not allowed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for AttributeValue object.Constructs a new AttributeValue object.AttributeValue(List<String> sS) Constructs a new AttributeValue object. -
Method Summary
Modifier and TypeMethodDescriptionaddMEntry(String key, AttributeValue value) Removes all the entries added into M.clone()booleangetB()A Binary data type.getBOOL()A Boolean data type.getBS()A Binary Set data type.getL()A List of attribute values.getM()A Map of attribute values.getN()A Number data type.getNS()A Number Set data type.getNULL()A Null data type.getS()A String data type.getSS()A String Set data type.inthashCode()isBOOL()A Boolean data type.isNULL()A Null data type.voidsetB(ByteBuffer b) A Binary data type.voidA Boolean data type.voidsetBS(Collection<ByteBuffer> bS) A Binary Set data type.voidA List of attribute values.voidsetM(Map<String, AttributeValue> m) A Map of attribute values.voidA Number data type.voidsetNS(Collection<String> nS) A Number Set data type.voidA Null data type.voidA String data type.voidsetSS(Collection<String> sS) A String Set data type.toString()Returns a string representation of this object; useful for testing and debugging.withB(ByteBuffer b) A Binary data type.A Boolean data type.withBS(ByteBuffer... bS) A Binary Set data type.withBS(Collection<ByteBuffer> bS) A Binary Set data type.withL(AttributeValue... l) A List of attribute values.A List of attribute values.withM(Map<String, AttributeValue> m) A Map of attribute values.A Number data type.A Number Set data type.withNS(Collection<String> nS) A Number Set data type.A Null data type.A String data type.A String Set data type.withSS(Collection<String> sS) A String Set data type.
-
Constructor Details
-
AttributeValue
public AttributeValue()Default constructor for AttributeValue object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it. -
AttributeValue
Constructs a new AttributeValue object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.- Parameters:
s- A String data type.
-
AttributeValue
-
-
Method Details
-
setS
-
getS
-
withS
A String data type.
- Parameters:
s- A String data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setN
-
getN
-
withN
A Number data type.
- Parameters:
n- A Number data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setB
A Binary data type.
AWS SDK for Java performs a Base64 encoding on this field before sending this request to AWS service by default. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
- Parameters:
b- A Binary data type.
-
getB
A Binary data type.
ByteBuffers are stateful. Calling theirgetmethods changes theirposition. We recommend usingByteBuffer.asReadOnlyBuffer()to create a read-only view of the buffer with an independentposition, and callinggetmethods on this rather than directly on the returnedByteBuffer. Doing so will ensure that anyone else using theByteBufferwill not be affected by changes to theposition.- Returns:
- A Binary data type.
-
withB
A Binary data type.
- Parameters:
b- A Binary data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getSS
-
setSS
A String Set data type.
- Parameters:
sS- A String Set data type.
-
withSS
A String Set data type.
NOTE: This method appends the values to the existing list (if any). Use
setSS(java.util.Collection)orwithSS(java.util.Collection)if you want to override the existing values.- Parameters:
sS- A String Set data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSS
A String Set data type.
- Parameters:
sS- A String Set data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getNS
-
setNS
A Number Set data type.
- Parameters:
nS- A Number Set data type.
-
withNS
A Number Set data type.
NOTE: This method appends the values to the existing list (if any). Use
setNS(java.util.Collection)orwithNS(java.util.Collection)if you want to override the existing values.- Parameters:
nS- A Number Set data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withNS
A Number Set data type.
- Parameters:
nS- A Number Set data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBS
-
setBS
A Binary Set data type.
- Parameters:
bS- A Binary Set data type.
-
withBS
A Binary Set data type.
NOTE: This method appends the values to the existing list (if any). Use
setBS(java.util.Collection)orwithBS(java.util.Collection)if you want to override the existing values.- Parameters:
bS- A Binary Set data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBS
A Binary Set data type.
- Parameters:
bS- A Binary Set data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getM
A Map of attribute values.
- Returns:
- A Map of attribute values.
-
setM
A Map of attribute values.
- Parameters:
m- A Map of attribute values.
-
withM
A Map of attribute values.
- Parameters:
m- A Map of attribute values.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addMEntry
-
clearMEntries
Removes all the entries added into M. <p> Returns a reference to this object so that method calls can be chained together. -
getL
-
setL
A List of attribute values.
- Parameters:
l- A List of attribute values.
-
withL
A List of attribute values.
NOTE: This method appends the values to the existing list (if any). Use
setL(java.util.Collection)orwithL(java.util.Collection)if you want to override the existing values.- Parameters:
l- A List of attribute values.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withL
A List of attribute values.
- Parameters:
l- A List of attribute values.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setNULL
-
getNULL
-
withNULL
A Null data type.
- Parameters:
nULLValue- A Null data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isNULL
-
setBOOL
-
getBOOL
-
withBOOL
A Boolean data type.
- Parameters:
bOOL- A Boolean data type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isBOOL
-
toString
-
equals
-
hashCode
-
clone
-