Package org.neo4j.ogm.typeconversion
Class InstantLongConverter
java.lang.Object
org.neo4j.ogm.typeconversion.InstantLongConverter
- All Implemented Interfaces:
AttributeConverter<Instant,
Number>
Converter to convert between
Instant
and Long
.
Since the value as represented in JSON loses type information and is just numeric,
the converted type used is Number
.
Stores values in database as milliseconds from the epoch day 1970-01-01T00:00:00Z
.
UTC time zone is being used to prevent timezones problems.- Author:
- Nicolas Mervaillie, RĂ³bert Papp
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
InstantLongConverter
public InstantLongConverter()
-
-
Method Details
-
toGraphProperty
- Specified by:
toGraphProperty
in interfaceAttributeConverter<Instant,
Number>
-
toEntityAttribute
- Specified by:
toEntityAttribute
in interfaceAttributeConverter<Instant,
Number>
-