Class DocumentTableSchema.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • addIndexPartitionKey

        public DocumentTableSchema.Builder addIndexPartitionKey​(String indexName,
                                                                String attributeName,
                                                                AttributeValueType attributeValueType)
        Adds information about a partition key associated with a specific index.
        Parameters:
        indexName - the name of the index to associate the partition key with
        attributeName - the name of the attribute that represents the partition key
        attributeValueType - the AttributeValueType of the partition key
        Throws:
        IllegalArgumentException - if a partition key has already been defined for this index
      • addIndexSortKey

        public DocumentTableSchema.Builder addIndexSortKey​(String indexName,
                                                           String attributeName,
                                                           AttributeValueType attributeValueType)
        Adds information about a sort key associated with a specific index.
        Parameters:
        indexName - the name of the index to associate the sort key with
        attributeName - the name of the attribute that represents the sort key
        attributeValueType - the AttributeValueType of the sort key
        Throws:
        IllegalArgumentException - if a sort key has already been defined for this index
      • attributeConverterProviders

        public DocumentTableSchema.Builder attributeConverterProviders​(AttributeConverterProvider... attributeConverterProviders)
        Specifies the AttributeConverterProviders to use with the table schema. The list of attribute converter providers must provide AttributeConverters 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.

        Parameters:
        attributeConverterProviders - a list of attribute converter providers to use with the table schema
      • attributeConverterProviders

        public DocumentTableSchema.Builder attributeConverterProviders​(List<AttributeConverterProvider> attributeConverterProviders)
        Specifies the AttributeConverterProviders to use with the table schema. The list of attribute converter providers must provide AttributeConverters 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.

        Parameters:
        attributeConverterProviders - a list of attribute converter providers to use with the table schema