Class IntArrayConverterImpl
- java.lang.Object
-
- science.aist.neo4j.reflective.converter.arrayprimitive.IntArrayConverterImpl
-
- All Implemented Interfaces:
FieldConverter<String,Object>
public class IntArrayConverterImpl extends Object implements FieldConverter<String,Object>
Converter that works on simple datatype array int[], which can't be cast to Object[]. We duplicate code here because this is more efficient than casting int[] to Integer[]- Since:
- 1.0
- Author:
- Oliver Krauss
-
-
Constructor Summary
Constructors Constructor Description IntArrayConverterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
mapForDb(String name, Object uncastValue, Map<String,Object> map)
Adds the value to the map for database processingObject
toJavaValue(Object uncastCurrentValue, Object newValue)
Transforms from db value to value understood by the java class
-
-
-
Method Detail
-
mapForDb
public void mapForDb(String name, Object uncastValue, Map<String,Object> map)
Description copied from interface:FieldConverter
Adds the value to the map for database processing- Specified by:
mapForDb
in interfaceFieldConverter<String,Object>
- Parameters:
name
- of fielduncastValue
- to be pushed to dbmap
- map the value will be entered in
-
toJavaValue
public Object toJavaValue(Object uncastCurrentValue, Object newValue)
Description copied from interface:FieldConverter
Transforms from db value to value understood by the java class- Specified by:
toJavaValue
in interfaceFieldConverter<String,Object>
- Parameters:
uncastCurrentValue
- value the java object has right nownewValue
- db to be transformed- Returns:
- Java value
-
-