Package org.neo4j.ogm.typeconversion
Class NumberCollectionStringConverter
java.lang.Object
org.neo4j.ogm.typeconversion.NumberCollectionStringConverter
- All Implemented Interfaces:
AttributeConverter<Collection<Number>,
String[]>
public class NumberCollectionStringConverter
extends Object
implements AttributeConverter<Collection<Number>,String[]>
The NumberStringConverter can be used to convert any java object collection containing values that extend
Number
to and from its String array representation.
By default, the OGM will automatically convert Collections of BigInteger
and BigDecimal
entity attributes using this converter.- Author:
- Luanne Misquitta, RĂ³bert Papp
-
Constructor Summary
ConstructorDescriptionNumberCollectionStringConverter
(Class<? extends Number> numberClass, Class<? extends Collection> collectionClass) -
Method Summary
Modifier and TypeMethodDescriptiontoEntityAttribute
(String[] stringValues) String[]
toGraphProperty
(Collection<Number> value)
-
Constructor Details
-
NumberCollectionStringConverter
public NumberCollectionStringConverter(Class<? extends Number> numberClass, Class<? extends Collection> collectionClass)
-
-
Method Details
-
toGraphProperty
- Specified by:
toGraphProperty
in interfaceAttributeConverter<Collection<Number>,
String[]>
-
toEntityAttribute
- Specified by:
toEntityAttribute
in interfaceAttributeConverter<Collection<Number>,
String[]>
-