com.holonplatform.datastore.jpa.converters.datetime

## Class LocalDateToDateAttributeConverter

- java.lang.Object
- - com.holonplatform.datastore.jpa.converters.datetime.LocalDateToDateAttributeConverter

- All Implemented Interfaces:
    javax.persistence.AttributeConverter<LocalDate,Date>

      public class LocalDateToDateAttributeConverter
      extends Object
      implements javax.persistence.AttributeConverter<LocalDate,Date>

  A JPA `AttributeConverter` to enable `LocalDate` 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.

  Since:
    5.0.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalDateToDateAttributeConverter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Date` | `convertToDatabaseColumn(LocalDate attribute)`
    `LocalDate` | `convertToEntityAttribute(Date dbData)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LocalDateToDateAttributeConverter

          public LocalDateToDateAttributeConverter()

  - ### Method Detail

    - #### convertToDatabaseColumn

          public Date convertToDatabaseColumn(LocalDate attribute)

      Specified by:
        `convertToDatabaseColumn` in interface `javax.persistence.AttributeConverter<LocalDate,Date>`

    - #### convertToEntityAttribute

          public LocalDate convertToEntityAttribute(Date dbData)

      Specified by:
        `convertToEntityAttribute` in interface `javax.persistence.AttributeConverter<LocalDate,Date>`

Copyright © 2019 The Holon Platform. All rights reserved.