primaryPartitionKey
Returns the attribute name used as the primary partition key for the table.
- Returns:
- The primary partition key attribute name.
- Throws:
IllegalArgumentException
- if the primary partition key is not known.
StaticTableMetadata
allKeys()
<T> Optional<T>
customMetadataObject(String key,
Class<? extends T> objectClass)
indexPartitionKey(String indexName)
indexSortKey(String indexName)
indices()
static String
default Collection<String>
default String
scalarAttributeType(String keyAttribute)
indexName
- The name of the index.IllegalArgumentException
- if the index does not exist in the metadata or does not have a partition key
associated with it..T
- 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.indexName
- The name of the index.keyAttributes()
instead.IndexMetadata
containing information about the indices.Object
.
This method should not be used to inspect individual custom metadata objects, instead use
customMetadataObject(String, Class)
()} as that will perform a type-safety check on the
retrieved object.
KeyAttributeMetadata
containing information about the keys.keyAttribute
- The key attribute name to return the scalar attribute type of.ScalarAttributeType
of the attribute, or empty if attribute is a non-scalar type.IllegalArgumentException
- if the keyAttribute is not found.IllegalArgumentException
- if the primary partition key is not known.
keyAttributes()
instead.