T - The object type.public final class DynamoDBMapperTableModel<T> extends Object implements DynamoDBTypeConverter<Map<String,AttributeValue>,T>
DynamoDBTypeConverter.AbstractConverter<S,T>, DynamoDBTypeConverter.DelegateConverter<S,T>, DynamoDBTypeConverter.ExtendedConverter<S,U,T>, DynamoDBTypeConverter.NullSafeConverter<S,T>| Modifier and Type | Method and Description |
|---|---|
Map<String,AttributeValue> |
convert(T object)
Turns an object of type T into an object of type S.
|
<H,R> Map<String,AttributeValue> |
convertKey(H hashKey,
R rangeKey)
Creates a new key map from the specified hash and range key.
|
<H,R> Map<String,AttributeValue> |
convertKey(T key)
Creates a new key map from the specified object.
|
<H,R> T |
createKey(H hashKey,
R rangeKey)
Creates a new object instance with the keys populated.
|
<V> DynamoDBMapperFieldModel<T,V> |
field(String attributeName)
Gets the field model for a given attribute.
|
Collection<DynamoDBMapperFieldModel<T,Object>> |
fields()
Gets all the field models for the given class.
|
GlobalSecondaryIndex |
globalSecondaryIndex(String indexName)
Gets the global secondary index.
|
Collection<GlobalSecondaryIndex> |
globalSecondaryIndexes()
Gets the global secondary indexes for the given class.
|
<H> DynamoDBMapperFieldModel<T,H> |
hashKey()
Gets the hash key field model for the specified type.
|
Collection<DynamoDBMapperFieldModel<T,Object>> |
keys()
Gets all the key field models for the given class.
|
LocalSecondaryIndex |
localSecondaryIndex(String indexName)
Gets the local secondary index by name.
|
Collection<LocalSecondaryIndex> |
localSecondaryIndexes()
Gets the local secondary indexes for the given class.
|
<R> DynamoDBMapperFieldModel<T,R> |
rangeKey()
Gets the range key field model for the specified type.
|
<R> DynamoDBMapperFieldModel<T,R> |
rangeKeyIfExists()
Gets the range key field model for the specified type.
|
Class<T> |
targetType()
Gets the object type.
|
T |
unconvert(Map<String,AttributeValue> object)
Turns an object of type S into an object of type T.
|
boolean |
versioned()
Indicates if this table has any versioned attributes.
|
Collection<DynamoDBMapperFieldModel<T,Object>> |
versions()
Gets all the version fields for the given class.
|
public Collection<DynamoDBMapperFieldModel<T,Object>> fields()
public <V> DynamoDBMapperFieldModel<T,V> field(String attributeName)
V - The field model's value type.attributeName - The attribute name.public Collection<DynamoDBMapperFieldModel<T,Object>> keys()
public <H> DynamoDBMapperFieldModel<T,H> hashKey()
H - The hash key type.DynamoDBMappingException - If the hash key is not present.public <R> DynamoDBMapperFieldModel<T,R> rangeKey()
R - The range key type.DynamoDBMappingException - If the range key is not present.public <R> DynamoDBMapperFieldModel<T,R> rangeKeyIfExists()
R - The range key type.public Collection<DynamoDBMapperFieldModel<T,Object>> versions()
public boolean versioned()
public Collection<GlobalSecondaryIndex> globalSecondaryIndexes()
public GlobalSecondaryIndex globalSecondaryIndex(String indexName)
indexName - The index name.public Collection<LocalSecondaryIndex> localSecondaryIndexes()
indexNames - The index names.public LocalSecondaryIndex localSecondaryIndex(String indexName)
indexNames - The index name.public Map<String,AttributeValue> convert(T object)
convert in interface DynamoDBTypeConverter<Map<String,AttributeValue>,T>public T unconvert(Map<String,AttributeValue> object)
unconvert in interface DynamoDBTypeConverter<Map<String,AttributeValue>,T>public <H,R> T createKey(H hashKey, R rangeKey)
H - The hash key type.R - The range key type.hashKey - The hash key.rangeKey - The range key (optional if not present on table).public <H,R> Map<String,AttributeValue> convertKey(T key)
H - The hash key type.R - The range key type.object - The object instance.public <H,R> Map<String,AttributeValue> convertKey(H hashKey, R rangeKey)
H - The hash key type.R - The range key type.hashKey - The hash key.rangeKey - The range key (optional if not present on table).Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.