@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AttributeValue extends Object implements Serializable, Cloneable, StructuredPojo
Represents the data for an attribute.
Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.
For more information, see Data Types in the Amazon DynamoDB Developer Guide.
Constructor and Description |
---|
AttributeValue()
Default constructor for AttributeValue object.
|
AttributeValue(List<String> sS)
Constructs a new AttributeValue object.
|
AttributeValue(String s)
Constructs a new AttributeValue object.
|
Modifier and Type | Method and Description |
---|---|
AttributeValue |
addMEntry(String key,
AttributeValue value) |
AttributeValue |
clearMEntries()
Removes all the entries added into M.
|
AttributeValue |
clone() |
boolean |
equals(Object obj) |
ByteBuffer |
getB()
An attribute of type Binary.
|
Boolean |
getBOOL()
An attribute of type Boolean.
|
List<ByteBuffer> |
getBS()
An attribute of type Binary Set.
|
List<AttributeValue> |
getL()
An attribute of type List.
|
Map<String,AttributeValue> |
getM()
An attribute of type Map.
|
String |
getN()
An attribute of type Number.
|
List<String> |
getNS()
An attribute of type Number Set.
|
Boolean |
getNULL()
An attribute of type Null.
|
String |
getS()
An attribute of type String.
|
List<String> |
getSS()
An attribute of type String Set.
|
int |
hashCode() |
Boolean |
isBOOL()
An attribute of type Boolean.
|
Boolean |
isNULL()
An attribute of type Null.
|
void |
marshall(ProtocolMarshaller protocolMarshaller) |
void |
setB(ByteBuffer b)
An attribute of type Binary.
|
void |
setBOOL(Boolean bOOL)
An attribute of type Boolean.
|
void |
setBS(Collection<ByteBuffer> bS)
An attribute of type Binary Set.
|
void |
setL(Collection<AttributeValue> l)
An attribute of type List.
|
void |
setM(Map<String,AttributeValue> m)
An attribute of type Map.
|
void |
setN(String n)
An attribute of type Number.
|
void |
setNS(Collection<String> nS)
An attribute of type Number Set.
|
void |
setNULL(Boolean nULLValue)
An attribute of type Null.
|
void |
setS(String s)
An attribute of type String.
|
void |
setSS(Collection<String> sS)
An attribute of type String Set.
|
String |
toString()
Returns a string representation of this object.
|
AttributeValue |
withB(ByteBuffer b)
An attribute of type Binary.
|
AttributeValue |
withBOOL(Boolean bOOL)
An attribute of type Boolean.
|
AttributeValue |
withBS(ByteBuffer... bS)
An attribute of type Binary Set.
|
AttributeValue |
withBS(Collection<ByteBuffer> bS)
An attribute of type Binary Set.
|
AttributeValue |
withL(AttributeValue... l)
An attribute of type List.
|
AttributeValue |
withL(Collection<AttributeValue> l)
An attribute of type List.
|
AttributeValue |
withM(Map<String,AttributeValue> m)
An attribute of type Map.
|
AttributeValue |
withN(String n)
An attribute of type Number.
|
AttributeValue |
withNS(Collection<String> nS)
An attribute of type Number Set.
|
AttributeValue |
withNS(String... nS)
An attribute of type Number Set.
|
AttributeValue |
withNULL(Boolean nULLValue)
An attribute of type Null.
|
AttributeValue |
withS(String s)
An attribute of type String.
|
AttributeValue |
withSS(Collection<String> sS)
An attribute of type String Set.
|
AttributeValue |
withSS(String... sS)
An attribute of type String Set.
|
public AttributeValue()
public AttributeValue(String s)
s
- An attribute of type String. For example:
"S": "Hello"
public AttributeValue(List<String> sS)
sS
- An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public void setS(String s)
An attribute of type String. For example:
"S": "Hello"
s
- An attribute of type String. For example:
"S": "Hello"
public String getS()
An attribute of type String. For example:
"S": "Hello"
"S": "Hello"
public AttributeValue withS(String s)
An attribute of type String. For example:
"S": "Hello"
s
- An attribute of type String. For example:
"S": "Hello"
public void setN(String n)
An attribute of type Number. For example:
"N": "123.45"
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
n
- An attribute of type Number. For example:
"N": "123.45"
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
public String getN()
An attribute of type Number. For example:
"N": "123.45"
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
"N": "123.45"
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
public AttributeValue withN(String n)
An attribute of type Number. For example:
"N": "123.45"
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
n
- An attribute of type Number. For example:
"N": "123.45"
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
public void setB(ByteBuffer b)
An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. 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.
b
- An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
public ByteBuffer getB()
An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
ByteBuffer
s are stateful. Calling their get
methods changes their position
. We recommend
using ByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independent
position
, and calling get
methods on this rather than directly on the returned ByteBuffer
.
Doing so will ensure that anyone else using the ByteBuffer
will not be affected by changes to the
position
.
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
public AttributeValue withB(ByteBuffer b)
An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
The AWS SDK for Java performs a Base64 encoding on this field before sending this request to the AWS service. 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.
b
- An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
public List<String> getSS()
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public void setSS(Collection<String> sS)
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
sS
- An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public AttributeValue withSS(String... sS)
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
NOTE: This method appends the values to the existing list (if any). Use
setSS(java.util.Collection)
or withSS(java.util.Collection)
if you want to override the
existing values.
sS
- An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public AttributeValue withSS(Collection<String> sS)
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
sS
- An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public List<String> getNS()
An attribute of type Number Set. For example:
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
public void setNS(Collection<String> nS)
An attribute of type Number Set. For example:
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
nS
- An attribute of type Number Set. For example:
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
public AttributeValue withNS(String... nS)
An attribute of type Number Set. For example:
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
NOTE: This method appends the values to the existing list (if any). Use
setNS(java.util.Collection)
or withNS(java.util.Collection)
if you want to override the
existing values.
nS
- An attribute of type Number Set. For example:
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
public AttributeValue withNS(Collection<String> nS)
An attribute of type Number Set. For example:
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
nS
- An attribute of type Number Set. For example:
"NS": ["42.2", "-19", "7.5", "3.14"]
Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.
public List<ByteBuffer> getBS()
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
public void setBS(Collection<ByteBuffer> bS)
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
bS
- An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
public AttributeValue withBS(ByteBuffer... bS)
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
NOTE: This method appends the values to the existing list (if any). Use
setBS(java.util.Collection)
or withBS(java.util.Collection)
if you want to override the
existing values.
bS
- An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
public AttributeValue withBS(Collection<ByteBuffer> bS)
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
bS
- An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
public Map<String,AttributeValue> getM()
An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
public void setM(Map<String,AttributeValue> m)
An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
m
- An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
public AttributeValue withM(Map<String,AttributeValue> m)
An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
m
- An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
public AttributeValue addMEntry(String key, AttributeValue value)
public AttributeValue clearMEntries()
public List<AttributeValue> getL()
An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
"L": ["Cookies", "Coffee", 3.14159]
public void setL(Collection<AttributeValue> l)
An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
l
- An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
public AttributeValue withL(AttributeValue... l)
An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
NOTE: This method appends the values to the existing list (if any). Use
setL(java.util.Collection)
or withL(java.util.Collection)
if you want to override the existing
values.
l
- An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
public AttributeValue withL(Collection<AttributeValue> l)
An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
l
- An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
public void setNULL(Boolean nULLValue)
An attribute of type Null. For example:
"NULL": true
nULLValue
- An attribute of type Null. For example:
"NULL": true
public Boolean getNULL()
An attribute of type Null. For example:
"NULL": true
"NULL": true
public AttributeValue withNULL(Boolean nULLValue)
An attribute of type Null. For example:
"NULL": true
nULLValue
- An attribute of type Null. For example:
"NULL": true
public Boolean isNULL()
An attribute of type Null. For example:
"NULL": true
"NULL": true
public void setBOOL(Boolean bOOL)
An attribute of type Boolean. For example:
"BOOL": true
bOOL
- An attribute of type Boolean. For example:
"BOOL": true
public Boolean getBOOL()
An attribute of type Boolean. For example:
"BOOL": true
"BOOL": true
public AttributeValue withBOOL(Boolean bOOL)
An attribute of type Boolean. For example:
"BOOL": true
bOOL
- An attribute of type Boolean. For example:
"BOOL": true
public Boolean isBOOL()
An attribute of type Boolean. For example:
"BOOL": true
"BOOL": true
public String toString()
toString
in class Object
Object.toString()
public AttributeValue clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
marshall
in interface StructuredPojo
Copyright © 2018. All rights reserved.