Class ArrayConverterImpl<T>
- java.lang.Object
-
- science.aist.neo4j.reflective.converter.ArrayConverterImpl<T>
-
- All Implemented Interfaces:
ArrayConverter<String,T>
,FieldConverter<String,T[]>
public class ArrayConverterImpl<T> extends Object implements ArrayConverter<String,T>
Converter that handles arrays.- Since:
- 1.0
- Author:
- Oliver Krauss
-
-
Field Summary
Fields Modifier and Type Field Description static char
SIZE_POSTFIX
-
Constructor Summary
Constructors Constructor Description ArrayConverterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
mapForDb(String name, T[] value, Map<String,Object> map)
Adds the value to the map for database processingvoid
setTypeConverter(FieldConverter<String,T> typeConverter)
Injects converter to transform a string to a typeT[]
toJavaValue(T[] currentValue, Object newValue)
Transforms from db value to value understood by the java class
-
-
-
Field Detail
-
SIZE_POSTFIX
public static final char SIZE_POSTFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
mapForDb
public void mapForDb(String name, T[] value, Map<String,Object> map)
Description copied from interface:FieldConverter
Adds the value to the map for database processing- Specified by:
mapForDb
in interfaceFieldConverter<String,T[]>
- Parameters:
name
- of fieldvalue
- to be pushed to dbmap
- map the value will be entered in
-
toJavaValue
public T[] toJavaValue(T[] currentValue, Object newValue)
Description copied from interface:FieldConverter
Transforms from db value to value understood by the java class- Specified by:
toJavaValue
in interfaceFieldConverter<String,T[]>
- Parameters:
currentValue
- value the java object has right nownewValue
- db to be transformed- Returns:
- Java value
-
setTypeConverter
public void setTypeConverter(FieldConverter<String,T> typeConverter)
Description copied from interface:ArrayConverter
Injects converter to transform a string to a type- Specified by:
setTypeConverter
in interfaceArrayConverter<String,T>
- Parameters:
typeConverter
- to be used for conversion
-
-