Class IntConverter
- java.lang.Object
-
- science.aist.neo4j.reflective.converter.IntConverter
-
- All Implemented Interfaces:
FieldConverter<Long,Integer>
public class IntConverter extends Object implements FieldConverter<Long,Integer>
Converter for int values, as they are implicitly cast to Long by Neo4J- Since:
- 1.0
- Author:
- Oliver Krauss
-
-
Constructor Summary
Constructors Constructor Description IntConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmapForDb(String name, Integer value, Map<String,Object> map)Adds the value to the map for database processingIntegertoJavaValue(Integer currentValue, Object value)Transforms from db value to value understood by the java class
-
-
-
Method Detail
-
mapForDb
public void mapForDb(String name, Integer value, Map<String,Object> map)
Description copied from interface:FieldConverterAdds the value to the map for database processing- Specified by:
mapForDbin interfaceFieldConverter<Long,Integer>- Parameters:
name- of fieldvalue- to be pushed to dbmap- map the value will be entered in
-
toJavaValue
public Integer toJavaValue(Integer currentValue, Object value)
Description copied from interface:FieldConverterTransforms from db value to value understood by the java class- Specified by:
toJavaValuein interfaceFieldConverter<Long,Integer>- Parameters:
currentValue- value the java object has right nowvalue- db to be transformed- Returns:
- Java value
-
-