public static class DefaultEnhancedDocument.DefaultBuilder extends Object implements EnhancedDocument.Builder
| Constructor and Description | 
|---|
| DefaultBuilder(DefaultEnhancedDocument enhancedDocument) | 
| Modifier and Type | Method and Description | 
|---|---|
| EnhancedDocument.Builder | addAttributeConverterProvider(AttributeConverterProvider attributeConverterProvider)Appends collection of attributeConverterProvider to the document builder. | 
| EnhancedDocument.Builder | attributeConverterProviders(AttributeConverterProvider... attributeConverterProviders)Sets collection of attributeConverterProviders to the document builder. | 
| EnhancedDocument.Builder | attributeConverterProviders(List<AttributeConverterProvider> attributeConverterProviders)Sets the collection of attributeConverterProviders to the document builder. | 
| EnhancedDocument.Builder | attributeValueMap(Map<String,AttributeValue> attributeValueMap)Sets the attributes of the document builder to those specified in the provided from a AttributeValue Map, and
 completely replaces any previously set attributes. | 
| EnhancedDocument | build()Builds an instance of  EnhancedDocument. | 
| EnhancedDocument.Builder | json(String json)Sets the attributes of the document builder to those specified in the provided JSON string, and completely replaces
 any previously set attributes. | 
| <T> EnhancedDocument.Builder | put(String attributeName,
   T value,
   Class<T> type)Appends an attribute named  attributeNamewith a value of Class type T. | 
| <T> EnhancedDocument.Builder | put(String attributeName,
   T value,
   EnhancedType<T> type)Appends an attribute named  attributeNamewith a value of typeEnhancedTypeT. | 
| EnhancedDocument.Builder | putBoolean(String attributeName,
          boolean value)Use this method when you need to add a boolean value to a document. | 
| EnhancedDocument.Builder | putBytes(String attributeName,
        SdkBytes value)Appends an attribute of name attributeName with specified   SdkBytesvalue to the document builder. | 
| EnhancedDocument.Builder | putBytesSet(String attributeName,
           Set<SdkBytes> values)Appends an attribute of name attributeName with specified Set of  SdkBytesvalues to the document builder. | 
| EnhancedDocument.Builder | putJson(String attributeName,
       String json)Appends an attribute to the document builder with the specified name and value of a JSON document in string format. | 
| <T> EnhancedDocument.Builder | putList(String attributeName,
       List<T> value,
       EnhancedType<T> type)Appends an attribute with the specified name and a list of  EnhancedTypeT type elements to the document
 builder. | 
| <K,V> EnhancedDocument.Builder | putMap(String attributeName,
      Map<K,V> value,
      EnhancedType<K> keyType,
      EnhancedType<V> valueType)Appends an attribute with the specified name and a Map containing keys and values of  EnhancedTypeK
 and V types,
 respectively, to the document builder. | 
| EnhancedDocument.Builder | putNull(String attributeName)Appends an attribute of name attributeName with a null value. | 
| EnhancedDocument.Builder | putNumber(String attributeName,
         Number value)Appends an attribute of name attributeName with specified   Numbervalue to the document builder. | 
| EnhancedDocument.Builder | putNumberSet(String attributeName,
            Set<Number> values)Appends an attribute of name attributeName with specified Set of  Numbervalues to the document builder. | 
| EnhancedDocument.Builder | putObject(String attributeName,
         Object value) | 
| EnhancedDocument.Builder | putString(String attributeName,
         String value)Appends an attribute of name attributeName with specified   Stringvalue to the document builder. | 
| EnhancedDocument.Builder | putStringSet(String attributeName,
            Set<String> values)Appends an attribute to the document builder with a Set of Strings as its value. | 
| EnhancedDocument.Builder | remove(String attributeName)Removes a previously appended attribute. | 
public DefaultBuilder(DefaultEnhancedDocument enhancedDocument)
public EnhancedDocument.Builder putObject(String attributeName, Object value)
public EnhancedDocument.Builder putString(String attributeName, String value)
EnhancedDocument.BuilderString value to the document builder.
 Use this method when you need to add a string value to a document. If you need to add an attribute with a value of a
 different type, such as a number or a map, use the appropriate put method insteadputString in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.value - The string value that needs to be set.EnhancedDocumentpublic EnhancedDocument.Builder putNumber(String attributeName, Number value)
EnhancedDocument.BuilderNumber value to the document builder.
 Use this method when you need to add a number value to a document. If you need to add an attribute with a value of a
 different type, such as a string or a map, use the appropriate put method insteadputNumber in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.value - The number value that needs to be set.EnhancedDocumentpublic EnhancedDocument.Builder putBytes(String attributeName, SdkBytes value)
EnhancedDocument.BuilderSdkBytes value to the document builder.
 Use this method when you need to add a binary value to a document. If you need to add an attribute with a value of a
 different type, such as a string or a map, use the appropriate put method insteadputBytes in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.value - The byte array value that needs to be set.EnhancedDocumentpublic EnhancedDocument.Builder putBoolean(String attributeName, boolean value)
EnhancedDocument.BuilderputBoolean in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.value - The boolean value that needs to be set.EnhancedDocumentpublic EnhancedDocument.Builder putNull(String attributeName)
EnhancedDocument.BuilderputNull in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.EnhancedDocumentpublic EnhancedDocument.Builder putStringSet(String attributeName, Set<String> values)
EnhancedDocument.BuilderputStringSet in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.values - Set of String values that needs to be set.EnhancedDocumentpublic EnhancedDocument.Builder putNumberSet(String attributeName, Set<Number> values)
EnhancedDocument.BuilderNumber values to the document builder.putNumberSet in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.values - Set of Number values that needs to be set.EnhancedDocumentpublic EnhancedDocument.Builder putBytesSet(String attributeName, Set<SdkBytes> values)
EnhancedDocument.BuilderSdkBytes values to the document builder.putBytesSet in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.values - Set of SdkBytes values that needs to be set.EnhancedDocumentpublic <T> EnhancedDocument.Builder putList(String attributeName, List<T> value, EnhancedType<T> type)
EnhancedDocument.BuilderEnhancedType  T type elements to the document
 builder.
 Use EnhancedType.of(Class) to specify the class type of the list elements.
 For example, to insert a list of String type:
Example for inserting a List of Custom type . Note that the AttributeConverterProvider added to the DocumentBuilder should provide the converter for the class T that is to be inserted.
putList in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.value - The list of values that needs to be set.EnhancedDocumentpublic <T> EnhancedDocument.Builder put(String attributeName, T value, EnhancedType<T> type)
EnhancedDocument.BuilderattributeName with a value of type EnhancedType T.
 Use this method to insert attribute values of custom types that have attribute converters defined in a converter
 provider.
 Example:
         
 Use EnhancedDocument.Builder.putString(String, String) or EnhancedDocument.Builder.putNumber(String, Number) for inserting simple value types of
 attributes.
 Use EnhancedDocument.Builder.putList(String, List, EnhancedType) or EnhancedDocument.Builder.putMap(String, Map, EnhancedType, EnhancedType) for
 inserting collections of attribute values.
 Note that the attribute converter provider added to the DocumentBuilder must provide the converter for the class T
 that is to be inserted.put in interface EnhancedDocument.BuilderT - the type of the value to set.attributeName - the name of the attribute to be added to the document.value - the value to set.type - the Enhanced type of the value to set.EnhancedDocument.public <T> EnhancedDocument.Builder put(String attributeName, T value, Class<T> type)
EnhancedDocument.BuilderattributeName with a value of Class type T.
 Use this method to insert attribute values of custom types that have attribute converters defined in a converter
 provider.
 Example:
         
 Use EnhancedDocument.Builder.putString(String, String) or EnhancedDocument.Builder.putNumber(String, Number) for inserting simple value types of
 attributes.
 Use EnhancedDocument.Builder.putList(String, List, EnhancedType) or EnhancedDocument.Builder.putMap(String, Map, EnhancedType, EnhancedType) for
 inserting collections of attribute values.
 Note that the attribute converter provider added to the DocumentBuilder must provide the converter for the class T
 that is to be inserted.put in interface EnhancedDocument.BuilderT - the type of the value to set.attributeName - the name of the attribute to be added to the document.value - the value to set.type - the type of the value to set.EnhancedDocument.public <K,V> EnhancedDocument.Builder putMap(String attributeName, Map<K,V> value, EnhancedType<K> keyType, EnhancedType<V> valueType)
EnhancedDocument.BuilderEnhancedType K
 and V types,
 respectively, to the document builder. Use EnhancedType.of(Class) to specify the class type of the keys and
 values.
 For example, to insert a map with String keys and Long values:
For example, to insert a map of String Key and Custom Values: Note that the AttributeConverterProvider added to the DocumentBuilder should provide the converter for the classes K and V that are to be inserted.
putMap in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the documentvalue - The Map of values that needs to be set.keyType - Enhanced type of Key classvalueType - Enhanced type of Value class.EnhancedDocumentpublic EnhancedDocument.Builder putJson(String attributeName, String json)
EnhancedDocument.BuilderputJson in interface EnhancedDocument.BuilderattributeName - the name of the attribute to be added to the document.json - JSON document in the form of a string.EnhancedDocumentpublic EnhancedDocument.Builder remove(String attributeName)
EnhancedDocument.Builderremove in interface EnhancedDocument.BuilderattributeName - The attribute that needs to be removed.EnhancedDocumentpublic EnhancedDocument.Builder addAttributeConverterProvider(AttributeConverterProvider attributeConverterProvider)
EnhancedDocument.BuilderaddAttributeConverterProvider in interface EnhancedDocument.BuilderattributeConverterProvider - determining the AttributeConverter to use for converting a value.EnhancedDocumentpublic EnhancedDocument.Builder attributeConverterProviders(List<AttributeConverterProvider> attributeConverterProviders)
EnhancedDocument.BuilderattributeConverterProviders in interface EnhancedDocument.BuilderattributeConverterProviders - determining the AttributeConverter to use for converting a value.EnhancedDocumentpublic EnhancedDocument.Builder attributeConverterProviders(AttributeConverterProvider... attributeConverterProviders)
EnhancedDocument.BuilderattributeConverterProviders in interface EnhancedDocument.BuilderattributeConverterProviders - determining the AttributeConverter to use for converting a value.EnhancedDocumentpublic EnhancedDocument.Builder json(String json)
EnhancedDocument.Builderjson in interface EnhancedDocument.Builderjson - a JSON document represented as a stringEnhancedDocumentpublic EnhancedDocument.Builder attributeValueMap(Map<String,AttributeValue> attributeValueMap)
EnhancedDocument.BuilderattributeValueMap in interface EnhancedDocument.BuilderattributeValueMap - - Map with Attributes as String keys and AttributeValue as Value.EnhancedDocumentpublic EnhancedDocument build()
EnhancedDocument.BuilderEnhancedDocument.build in interface EnhancedDocument.BuilderEnhancedDocument implementation.Copyright © 2023. All rights reserved.