public class AttributeValue
extends java.lang.Object
implements java.io.Serializable
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.
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)
A Map of attribute values.
|
AttributeValue |
clearMEntries()
Removes all the entries added into M.
|
boolean |
equals(java.lang.Object obj) |
java.nio.ByteBuffer |
getB()
A Binary data type.
|
java.lang.Boolean |
getBOOL()
A Boolean data type.
|
java.util.List<java.nio.ByteBuffer> |
getBS()
A Binary Set data type.
|
java.util.List<AttributeValue> |
getL()
A List of attribute values.
|
java.util.Map<java.lang.String,AttributeValue> |
getM()
A Map of attribute values.
|
java.lang.String |
getN()
A Number data type.
|
java.util.List<java.lang.String> |
getNS()
A Number Set data type.
|
java.lang.Boolean |
getNULL()
A Null data type.
|
java.lang.String |
getS()
A String data type.
|
java.util.List<java.lang.String> |
getSS()
A String Set data type.
|
int |
hashCode() |
java.lang.Boolean |
isBOOL()
A Boolean data type.
|
java.lang.Boolean |
isNULL()
A Null data type.
|
void |
setB(java.nio.ByteBuffer b)
A Binary data type.
|
void |
setBOOL(java.lang.Boolean bOOL)
A Boolean data type.
|
void |
setBS(java.util.Collection<java.nio.ByteBuffer> bS)
A Binary Set data type.
|
void |
setL(java.util.Collection<AttributeValue> l)
A List of attribute values.
|
void |
setM(java.util.Map<java.lang.String,AttributeValue> m)
A Map of attribute values.
|
void |
setN(java.lang.String n)
A Number data type.
|
void |
setNS(java.util.Collection<java.lang.String> nS)
A Number Set data type.
|
void |
setNULL(java.lang.Boolean nULL)
A Null data type.
|
void |
setS(java.lang.String s)
A String data type.
|
void |
setSS(java.util.Collection<java.lang.String> sS)
A String Set data type.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
AttributeValue |
withB(java.nio.ByteBuffer b)
A Binary data type.
|
AttributeValue |
withBOOL(java.lang.Boolean bOOL)
A Boolean data type.
|
AttributeValue |
withBS(java.nio.ByteBuffer... bS)
A Binary Set data type.
|
AttributeValue |
withBS(java.util.Collection<java.nio.ByteBuffer> bS)
A Binary Set data type.
|
AttributeValue |
withL(AttributeValue... l)
A List of attribute values.
|
AttributeValue |
withL(java.util.Collection<AttributeValue> l)
A List of attribute values.
|
AttributeValue |
withM(java.util.Map<java.lang.String,AttributeValue> m)
A Map of attribute values.
|
AttributeValue |
withN(java.lang.String n)
A Number data type.
|
AttributeValue |
withNS(java.util.Collection<java.lang.String> nS)
A Number Set data type.
|
AttributeValue |
withNS(java.lang.String... nS)
A Number Set data type.
|
AttributeValue |
withNULL(java.lang.Boolean nULL)
A Null data type.
|
AttributeValue |
withS(java.lang.String s)
A String data type.
|
AttributeValue |
withSS(java.util.Collection<java.lang.String> sS)
A String Set data type.
|
AttributeValue |
withSS(java.lang.String... sS)
A String Set data type.
|
public AttributeValue()
public AttributeValue(java.lang.String s)
s
- A String data type.
public AttributeValue(java.util.List<java.lang.String> sS)
sS
- A String Set data type.
public java.lang.String getS()
A String data type.
A String data type.
public void setS(java.lang.String s)
A String data type.
s
- A String data type.
public AttributeValue withS(java.lang.String s)
A String data type.
Returns a reference to this object so that method calls can be chained together.
s
- A String data type.
public java.lang.String getN()
A Number data type.
A Number data type.
public void setN(java.lang.String n)
A Number data type.
n
- A Number data type.
public AttributeValue withN(java.lang.String n)
A Number data type.
Returns a reference to this object so that method calls can be chained together.
n
- A Number data type.
public java.nio.ByteBuffer getB()
A Binary data type.
A Binary data type.
public void setB(java.nio.ByteBuffer b)
A Binary data type.
b
- A Binary data type.
public AttributeValue withB(java.nio.ByteBuffer b)
A Binary data type.
Returns a reference to this object so that method calls can be chained together.
b
- A Binary data type.
public java.util.List<java.lang.String> getSS()
A String Set data type.
A String Set data type.
public void setSS(java.util.Collection<java.lang.String> sS)
A String Set data type.
sS
- A String Set data type.
public AttributeValue withSS(java.lang.String... sS)
A String Set data type.
Returns a reference to this object so that method calls can be chained together.
sS
- A String Set data type.
public AttributeValue withSS(java.util.Collection<java.lang.String> sS)
A String Set data type.
Returns a reference to this object so that method calls can be chained together.
sS
- A String Set data type.
public java.util.List<java.lang.String> getNS()
A Number Set data type.
A Number Set data type.
public void setNS(java.util.Collection<java.lang.String> nS)
A Number Set data type.
nS
- A Number Set data type.
public AttributeValue withNS(java.lang.String... nS)
A Number Set data type.
Returns a reference to this object so that method calls can be chained together.
nS
- A Number Set data type.
public AttributeValue withNS(java.util.Collection<java.lang.String> nS)
A Number Set data type.
Returns a reference to this object so that method calls can be chained together.
nS
- A Number Set data type.
public java.util.List<java.nio.ByteBuffer> getBS()
A Binary Set data type.
A Binary Set data type.
public void setBS(java.util.Collection<java.nio.ByteBuffer> bS)
A Binary Set data type.
bS
- A Binary Set data type.
public AttributeValue withBS(java.nio.ByteBuffer... bS)
A Binary Set data type.
Returns a reference to this object so that method calls can be chained together.
bS
- A Binary Set data type.
public AttributeValue withBS(java.util.Collection<java.nio.ByteBuffer> bS)
A Binary Set data type.
Returns a reference to this object so that method calls can be chained together.
bS
- A Binary Set data type.
public java.util.Map<java.lang.String,AttributeValue> getM()
A Map of attribute values.
A Map of attribute values.
public void setM(java.util.Map<java.lang.String,AttributeValue> m)
A Map of attribute values.
m
- A Map of attribute values.
public AttributeValue withM(java.util.Map<java.lang.String,AttributeValue> m)
A Map of attribute values.
Returns a reference to this object so that method calls can be chained together.
m
- A Map of attribute values.
public AttributeValue addMEntry(java.lang.String key, AttributeValue value)
A Map of attribute values.
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()
A List of attribute values.
A List of attribute values.
public void setL(java.util.Collection<AttributeValue> l)
A List of attribute values.
l
- A List of attribute values.
public AttributeValue withL(AttributeValue... l)
A List of attribute values.
Returns a reference to this object so that method calls can be chained together.
l
- A List of attribute values.
public AttributeValue withL(java.util.Collection<AttributeValue> l)
A List of attribute values.
Returns a reference to this object so that method calls can be chained together.
l
- A List of attribute values.
public java.lang.Boolean isNULL()
A Null data type.
A Null data type.
public java.lang.Boolean getNULL()
A Null data type.
A Null data type.
public void setNULL(java.lang.Boolean nULL)
A Null data type.
nULL
- A Null data type.
public AttributeValue withNULL(java.lang.Boolean nULL)
A Null data type.
Returns a reference to this object so that method calls can be chained together.
nULL
- A Null data type.
public java.lang.Boolean isBOOL()
A Boolean data type.
A Boolean data type.
public java.lang.Boolean getBOOL()
A Boolean data type.
A Boolean data type.
public void setBOOL(java.lang.Boolean bOOL)
A Boolean data type.
bOOL
- A Boolean data type.
public AttributeValue withBOOL(java.lang.Boolean bOOL)
A Boolean data type.
Returns a reference to this object so that method calls can be chained together.
bOOL
- A Boolean data type.
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 © 2010 Amazon Web Services, Inc. All Rights Reserved.