public class InstantLongConverter extends Object implements AttributeConverter<Instant,Number>
Instant to Long.
Since the value as represented in JSON loses type information and is just numeric, the converted type used is Number
Stores values in db as milliseconds from the epoch of 1970-01-01T00:00:00Z, UTC beeing used to preserve from
timezones problems.| Constructor and Description |
|---|
InstantLongConverter() |
| Modifier and Type | Method and Description |
|---|---|
Instant |
toEntityAttribute(Number value) |
Long |
toGraphProperty(Instant value) |
public Long toGraphProperty(Instant value)
toGraphProperty in interface AttributeConverter<Instant,Number>public Instant toEntityAttribute(Number value)
toEntityAttribute in interface AttributeConverter<Instant,Number>Copyright © 2018 Neo Technology, Inc.. All rights reserved.