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 charSIZE_POSTFIX
-
Constructor Summary
Constructors Constructor Description ArrayConverterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmapForDb(String name, T[] value, Map<String,Object> map)Adds the value to the map for database processingvoidsetTypeConverter(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:FieldConverterAdds the value to the map for database processing- Specified by:
mapForDbin 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:FieldConverterTransforms from db value to value understood by the java class- Specified by:
toJavaValuein 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:ArrayConverterInjects converter to transform a string to a type- Specified by:
setTypeConverterin interfaceArrayConverter<String,T>- Parameters:
typeConverter- to be used for conversion
-
-