Package org.neo4j.ogm.typeconversion
Class DateCollectionStringConverter
java.lang.Object
org.neo4j.ogm.typeconversion.DateCollectionStringConverter
- All Implemented Interfaces:
AttributeConverter<Collection<Date>,
String[]>
public class DateCollectionStringConverter
extends Object
implements AttributeConverter<Collection<Date>,String[]>
By default the OGM will map date collections to UTC-based ISO8601 compliant
String collections when being stored as a node / relationship property
Users can override this behaviour for Date objects using
the appropriate annotations:
DateString.FORMAT
will convert between dates and strings
using a user defined date format, e.g. "yy-MM-dd"
DateLong
will read and write dates as Long values in the database.- Author:
- Luanne Misquitta
-
Constructor Summary
ConstructorDescriptionDateCollectionStringConverter
(String userDefinedFormat, Class<? extends Collection> collectionClass) -
Method Summary
Modifier and TypeMethodDescriptiontoEntityAttribute
(String[] dateValues) String[]
toGraphProperty
(Collection<Date> value)
-
Constructor Details
-
DateCollectionStringConverter
public DateCollectionStringConverter(String userDefinedFormat, Class<? extends Collection> collectionClass)
-
-
Method Details
-
toGraphProperty
- Specified by:
toGraphProperty
in interfaceAttributeConverter<Collection<Date>,
String[]>
-
toEntityAttribute
- Specified by:
toEntityAttribute
in interfaceAttributeConverter<Collection<Date>,
String[]>
-