public class LocalDateTimeToDateAttributeConverter extends Object implements javax.persistence.AttributeConverter<LocalDateTime,Date>
AttributeConverter to enable LocalDateTime data type for entity attributes.
This converter is automatically applyed if present in the ORM auto-scan package list.
Attribute values are expected to be backed by a Date-compatible type in database.
| Constructor and Description |
|---|
LocalDateTimeToDateAttributeConverter() |
| Modifier and Type | Method and Description |
|---|---|
Date |
convertToDatabaseColumn(LocalDateTime attribute) |
LocalDateTime |
convertToEntityAttribute(Date dbData) |
public LocalDateTimeToDateAttributeConverter()
public Date convertToDatabaseColumn(LocalDateTime attribute)
convertToDatabaseColumn in interface javax.persistence.AttributeConverter<LocalDateTime,Date>public LocalDateTime convertToEntityAttribute(Date dbData)
convertToEntityAttribute in interface javax.persistence.AttributeConverter<LocalDateTime,Date>Copyright © 2019 The Holon Platform. All rights reserved.