Package org.leo.aws.ddb.repositories
Enum MapperUtils
- java.lang.Object
-
- java.lang.Enum<MapperUtils>
-
- org.leo.aws.ddb.repositories.MapperUtils
-
- All Implemented Interfaces:
Serializable,Comparable<MapperUtils>
public enum MapperUtils extends Enum<MapperUtils>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Field Summary
Fields Modifier and Type Field Description private ConcurrentHashMap<String,AttributeMapper<?>>attributeMappingMapprivate ReentrantReadWriteLocklock
-
Constructor Summary
Constructors Modifier Constructor Description privateMapperUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private <T> Constructor<T>constructor(Class<T> dataClass)private List<Field>filterFields(List<Field> fields)private <T> List<Field>getAllFields(Class<T> dataClass)private List<Field>getAllFields(Class dataClass, List<Field> acc)ConcurrentHashMap<String,AttributeMapper<?>>getAttributeMappingMap()private <T> StringgetFieldName(DbAttribute dbAttribute, DateCreated dateCreated, DateUpdated dateUpdated, Field field, AttributeMapper.Builder<T> builder)(package private) static MapperUtilsgetInstance()(package private) <T> Stream<Tuple3<String,Field,DbAttribute>>getMappedValues(String parameterType)(package private) <T> Stream<Tuple4<String,Object,Field,DbAttribute>>getMappedValues(T input, Class<T> parameterClass)(package private) <T> Stream<Tuple4<String,Object,Field,DbAttribute>>getMappedValues(T input, String parameterType)private booleanisAnnotatedCorrectly(List<Annotation> annotations)private booleanisTransient(List<Annotation> annotations)(package private) <T> voidsetDbAttributes(Class<T> dataClass, org.springframework.core.env.Environment environment, DataMapper<T> dataMapper)private <T> voidsetFieldMappings(Map<String,Tuple<Field,DbAttribute>> mappedFields, Map<KeyType,Tuple<String,Field>> primaryKeyMapping, Field field, ConcurrentHashMap<String,GSI.Builder> indexMap, Map<String,Tuple<Field,DbAttribute>> versionAttMap, AttributeMapper.Builder<T> builder)static MapperUtilsvalueOf(String name)Returns the enum constant of this type with the specified name.static MapperUtils[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final MapperUtils INSTANCE
-
-
Field Detail
-
attributeMappingMap
private final ConcurrentHashMap<String,AttributeMapper<?>> attributeMappingMap
-
lock
private final ReentrantReadWriteLock lock
-
-
Method Detail
-
values
public static MapperUtils[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MapperUtils c : MapperUtils.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MapperUtils valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
setDbAttributes
<T> void setDbAttributes(Class<T> dataClass, org.springframework.core.env.Environment environment, DataMapper<T> dataMapper)
-
getMappedValues
<T> Stream<Tuple4<String,Object,Field,DbAttribute>> getMappedValues(T input, String parameterType)
-
getMappedValues
<T> Stream<Tuple4<String,Object,Field,DbAttribute>> getMappedValues(T input, Class<T> parameterClass)
-
getMappedValues
<T> Stream<Tuple3<String,Field,DbAttribute>> getMappedValues(String parameterType)
-
constructor
private <T> Constructor<T> constructor(Class<T> dataClass)
-
setFieldMappings
private <T> void setFieldMappings(Map<String,Tuple<Field,DbAttribute>> mappedFields, Map<KeyType,Tuple<String,Field>> primaryKeyMapping, Field field, ConcurrentHashMap<String,GSI.Builder> indexMap, Map<String,Tuple<Field,DbAttribute>> versionAttMap, AttributeMapper.Builder<T> builder)
-
getFieldName
private <T> String getFieldName(DbAttribute dbAttribute, DateCreated dateCreated, DateUpdated dateUpdated, Field field, AttributeMapper.Builder<T> builder)
-
isTransient
private boolean isTransient(List<Annotation> annotations)
-
isAnnotatedCorrectly
private boolean isAnnotatedCorrectly(List<Annotation> annotations)
-
getAttributeMappingMap
public ConcurrentHashMap<String,AttributeMapper<?>> getAttributeMappingMap()
-
getInstance
static MapperUtils getInstance()
-
-