public class AttributeValue
extends java.lang.Object
implements java.io.Serializable
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(java.util.List<java.lang.String> sS)
Constructs a new AttributeValue object.
|
AttributeValue(java.lang.String s)
Constructs a new AttributeValue object.
|
Modifier and Type | Method and Description |
---|---|
AttributeValue |
addMEntry(java.lang.String key,
AttributeValue value)
An attribute of type Map.
|
AttributeValue |
clearMEntries()
Removes all the entries added into M.
|
boolean |
equals(java.lang.Object obj) |
java.nio.ByteBuffer |
getB()
An attribute of type Binary.
|
java.lang.Boolean |
getBOOL()
An attribute of type Boolean.
|
java.util.List<java.nio.ByteBuffer> |
getBS()
An attribute of type Binary Set.
|
java.util.List<AttributeValue> |
getL()
An attribute of type List.
|
java.util.Map<java.lang.String,AttributeValue> |
getM()
An attribute of type Map.
|
java.lang.String |
getN()
An attribute of type Number.
|
java.util.List<java.lang.String> |
getNS()
An attribute of type Number Set.
|
java.lang.Boolean |
getNULL()
An attribute of type Null.
|
java.lang.String |
getS()
An attribute of type String.
|
java.util.List<java.lang.String> |
getSS()
An attribute of type String Set.
|
int |
hashCode() |
java.lang.Boolean |
isBOOL()
An attribute of type Boolean.
|
java.lang.Boolean |
isNULL()
An attribute of type Null.
|
void |
setB(java.nio.ByteBuffer b)
An attribute of type Binary.
|
void |
setBOOL(java.lang.Boolean bOOL)
An attribute of type Boolean.
|
void |
setBS(java.util.Collection<java.nio.ByteBuffer> bS)
An attribute of type Binary Set.
|
void |
setL(java.util.Collection<AttributeValue> l)
An attribute of type List.
|
void |
setM(java.util.Map<java.lang.String,AttributeValue> m)
An attribute of type Map.
|
void |
setN(java.lang.String n)
An attribute of type Number.
|
void |
setNS(java.util.Collection<java.lang.String> nS)
An attribute of type Number Set.
|
void |
setNULL(java.lang.Boolean nULL)
An attribute of type Null.
|
void |
setS(java.lang.String s)
An attribute of type String.
|
void |
setSS(java.util.Collection<java.lang.String> sS)
An attribute of type String Set.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AttributeValue |
withB(java.nio.ByteBuffer b)
An attribute of type Binary.
|
AttributeValue |
withBOOL(java.lang.Boolean bOOL)
An attribute of type Boolean.
|
AttributeValue |
withBS(java.nio.ByteBuffer... bS)
An attribute of type Binary Set.
|
AttributeValue |
withBS(java.util.Collection<java.nio.ByteBuffer> bS)
An attribute of type Binary Set.
|
AttributeValue |
withL(AttributeValue... l)
An attribute of type List.
|
AttributeValue |
withL(java.util.Collection<AttributeValue> l)
An attribute of type List.
|
AttributeValue |
withM(java.util.Map<java.lang.String,AttributeValue> m)
An attribute of type Map.
|
AttributeValue |
withN(java.lang.String n)
An attribute of type Number.
|
AttributeValue |
withNS(java.util.Collection<java.lang.String> nS)
An attribute of type Number Set.
|
AttributeValue |
withNS(java.lang.String... nS)
An attribute of type Number Set.
|
AttributeValue |
withNULL(java.lang.Boolean nULL)
An attribute of type Null.
|
AttributeValue |
withS(java.lang.String s)
An attribute of type String.
|
AttributeValue |
withSS(java.util.Collection<java.lang.String> sS)
An attribute of type String Set.
|
AttributeValue |
withSS(java.lang.String... sS)
An attribute of type String Set.
|
public AttributeValue()
public AttributeValue(java.lang.String s)
s
- An attribute of type String. For example:
"S": "Hello"
public AttributeValue(java.util.List<java.lang.String> sS)
sS
- An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public java.lang.String getS()
An attribute of type String. For example:
"S": "Hello"
An attribute of type String. For example:
"S": "Hello"
public void setS(java.lang.String s)
An attribute of type String. For example:
"S": "Hello"
s
- An attribute of type String. For example:
"S": "Hello"
public AttributeValue withS(java.lang.String s)
An attribute of type String. For example:
"S": "Hello"
Returns a reference to this object so that method calls can be chained together.
s
- An attribute of type String. For example:
"S": "Hello"
public java.lang.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.
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 setN(java.lang.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 AttributeValue withN(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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 java.nio.ByteBuffer getB()
An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
public void setB(java.nio.ByteBuffer b)
An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
b
- An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
public AttributeValue withB(java.nio.ByteBuffer b)
An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
Returns a reference to this object so that method calls can be chained together.
b
- An attribute of type Binary. For example:
"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"
public java.util.List<java.lang.String> getSS()
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public void setSS(java.util.Collection<java.lang.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(java.lang.String... sS)
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
Returns a reference to this object so that method calls can be chained together.
sS
- An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public AttributeValue withSS(java.util.Collection<java.lang.String> sS)
An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
Returns a reference to this object so that method calls can be chained together.
sS
- An attribute of type String Set. For example:
"SS": ["Giraffe", "Hippo" ,"Zebra"]
public java.util.List<java.lang.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.
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 void setNS(java.util.Collection<java.lang.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(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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(java.util.Collection<java.lang.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.
Returns a reference to this object so that method calls can be chained together.
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 java.util.List<java.nio.ByteBuffer> getBS()
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
public void setBS(java.util.Collection<java.nio.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(java.nio.ByteBuffer... bS)
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
Returns a reference to this object so that method calls can be chained together.
bS
- An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
public AttributeValue withBS(java.util.Collection<java.nio.ByteBuffer> bS)
An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
Returns a reference to this object so that method calls can be chained together.
bS
- An attribute of type Binary Set. For example:
"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]
public java.util.Map<java.lang.String,AttributeValue> getM()
An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
public void setM(java.util.Map<java.lang.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(java.util.Map<java.lang.String,AttributeValue> m)
An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
Returns a reference to this object so that method calls can be chained together.
m
- An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
public AttributeValue addMEntry(java.lang.String key, AttributeValue value)
An attribute of type Map. For example:
"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}
The method adds a new key-value pair into M parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into M.value
- The corresponding value of the entry to be added into M.public AttributeValue clearMEntries()
Returns a reference to this object so that method calls can be chained together.
public java.util.List<AttributeValue> getL()
An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
public void setL(java.util.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]
Returns a reference to this object so that method calls can be chained together.
l
- An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
public AttributeValue withL(java.util.Collection<AttributeValue> l)
An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
Returns a reference to this object so that method calls can be chained together.
l
- An attribute of type List. For example:
"L": ["Cookies", "Coffee", 3.14159]
public java.lang.Boolean isNULL()
An attribute of type Null. For example:
"NULL": true
An attribute of type Null. For example:
"NULL": true
public java.lang.Boolean getNULL()
An attribute of type Null. For example:
"NULL": true
An attribute of type Null. For example:
"NULL": true
public void setNULL(java.lang.Boolean nULL)
An attribute of type Null. For example:
"NULL": true
nULL
- An attribute of type Null. For example:
"NULL": true
public AttributeValue withNULL(java.lang.Boolean nULL)
An attribute of type Null. For example:
"NULL": true
Returns a reference to this object so that method calls can be chained together.
nULL
- An attribute of type Null. For example:
"NULL": true
public java.lang.Boolean isBOOL()
An attribute of type Boolean. For example:
"BOOL": true
An attribute of type Boolean. For example:
"BOOL": true
public java.lang.Boolean getBOOL()
An attribute of type Boolean. For example:
"BOOL": true
An attribute of type Boolean. For example:
"BOOL": true
public void setBOOL(java.lang.Boolean bOOL)
An attribute of type Boolean. For example:
"BOOL": true
bOOL
- An attribute of type Boolean. For example:
"BOOL": true
public AttributeValue withBOOL(java.lang.Boolean bOOL)
An attribute of type Boolean. For example:
"BOOL": true
Returns a reference to this object so that method calls can be chained together.
bOOL
- An attribute of type Boolean. For example:
"BOOL": true
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.