@ThreadSafe public class StaticTableMetadata extends Object implements TableMetadata
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Collection<String> |
getAllKeys()
Returns all the names of attributes associated with any index (primary or secondary) known for this table.
|
<T> Optional<T> |
getCustomMetadataObject(String key,
Class<? extends T> objectClass)
Returns a custom metadata object.
|
Collection<String> |
getIndexKeys(String indexName)
Returns all the names of attributes associated with the keys of a specified index.
|
String |
getIndexPartitionKey(String indexName)
Returns the attribute name of the partition key for an index.
|
Optional<String> |
getIndexSortKey(String indexName)
Returns the attribute name of the sort key for an index.
|
Optional<ScalarAttributeType> |
getScalarAttributeType(String keyAttribute)
Returns the DynamoDb scalar attribute type associated with a key attribute if one is applicable.
|
int |
hashCode() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetPrimaryIndexName, getPrimaryKeys, getPrimaryPartitionKey, getPrimarySortKeypublic <T> Optional<T> getCustomMetadataObject(String key, Class<? extends T> objectClass)
TableMetadatagetCustomMetadataObject in interface TableMetadataT - The flexible type for the object being returned. The compiler will typically infer this.key - A unique key for the metadata object. This namespace is shared by all extensions, so it is
recommended best practice to qualify it with the name of your extension.objectClass - The java class that the object will be cast to before returning. An exception will be
thrown if the stored object cannot be cast to this class.public String getIndexPartitionKey(String indexName)
TableMetadatagetIndexPartitionKey in interface TableMetadataindexName - The name of the index.public Optional<String> getIndexSortKey(String indexName)
TableMetadatagetIndexSortKey in interface TableMetadataindexName - The name of the index.public Collection<String> getIndexKeys(String indexName)
TableMetadatagetIndexKeys in interface TableMetadataindexName - The name of the index.public Collection<String> getAllKeys()
TableMetadatagetAllKeys in interface TableMetadatapublic Optional<ScalarAttributeType> getScalarAttributeType(String keyAttribute)
TableMetadatagetScalarAttributeType in interface TableMetadatakeyAttribute - The key attribute name to return the scalar attribute type of.ScalarAttributeType of the attribute, or empty if attribute is a non-scalar type.Copyright © 2019. All rights reserved.