@NotThreadSafe public static final class DocumentTableSchema.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DocumentTableSchema.Builder |
addIndexPartitionKey(String indexName,
String attributeName,
AttributeValueType attributeValueType)
Adds information about a partition key associated with a specific index.
|
DocumentTableSchema.Builder |
addIndexSortKey(String indexName,
String attributeName,
AttributeValueType attributeValueType)
Adds information about a sort key associated with a specific index.
|
DocumentTableSchema.Builder |
attributeConverterProviders(AttributeConverterProvider... attributeConverterProviders)
Specifies the
AttributeConverterProvider s to use with the table schema. |
DocumentTableSchema.Builder |
attributeConverterProviders(List<AttributeConverterProvider> attributeConverterProviders)
Specifies the
AttributeConverterProvider s to use with the table schema. |
DocumentTableSchema |
build()
Builds a
StaticImmutableTableSchema based on the values this builder has been configured with |
public DocumentTableSchema.Builder addIndexPartitionKey(String indexName, String attributeName, AttributeValueType attributeValueType)
indexName
- the name of the index to associate the partition key withattributeName
- the name of the attribute that represents the partition keyattributeValueType
- the AttributeValueType
of the partition keyIllegalArgumentException
- if a partition key has already been defined for this indexpublic DocumentTableSchema.Builder addIndexSortKey(String indexName, String attributeName, AttributeValueType attributeValueType)
indexName
- the name of the index to associate the sort key withattributeName
- the name of the attribute that represents the sort keyattributeValueType
- the AttributeValueType
of the sort keyIllegalArgumentException
- if a sort key has already been defined for this indexpublic DocumentTableSchema.Builder attributeConverterProviders(AttributeConverterProvider... attributeConverterProviders)
AttributeConverterProvider
s to use with the table schema. The list of attribute converter
providers must provide AttributeConverter
s for Custom types. The attribute converter providers will be loaded
in the strict order they are supplied here.
By default, DefaultAttributeConverterProvider
will be used, and it will provide standard converters for most
primitive and common Java types. Configuring this will override the default behavior, so it is recommended to always
append `DefaultAttributeConverterProvider` when you configure the custom attribute converter providers.
attributeConverterProviders
- a list of attribute converter providers to use with the table schemapublic DocumentTableSchema.Builder attributeConverterProviders(List<AttributeConverterProvider> attributeConverterProviders)
AttributeConverterProvider
s to use with the table schema. The list of attribute converter
providers must provide AttributeConverter
s for all types used in the schema. The attribute converter providers
will be loaded in the strict order they are supplied here.
By default, DefaultAttributeConverterProvider
will be used, and it will provide standard converters for most
primitive and common Java types. Configuring this will override the default behavior, so it is recommended to always
append `DefaultAttributeConverterProvider` when you configure the custom attribute converter providers.
attributeConverterProviders
- a list of attribute converter providers to use with the table schemapublic DocumentTableSchema build()
StaticImmutableTableSchema
based on the values this builder has been configured withCopyright © 2023. All rights reserved.