Codec support for Java 8

Description

Add support for java.time.Instant mapping instead of java.util.Date in class mapping.

Add support for java.util.Optional<?> in Accessor interfaces.

Environment

None

Pull Requests

None

Activity

Show:
Xabier Burgos
February 28, 2015, 12:50 PM
Edited

I would suggest to instead of just providing support for Java 8 types, it'd be nice if you opened up the ColumnMapper interfaces and added a registration mechanism so that users can register their own column mappers. Integration with Spring's ConversionService would also be very welcomed.

Olivier Michallat
July 28, 2015, 10:49 AM
Edited

(fixed in 2.2.0-rc2) provides a way to plug your own codecs into the mapper.

We plan to provide common extra codecs as a separate module in a future version, Java 8 dates will likely be part of it.

If you want to implement it yourself, the default codecs and JodaCodecs in our integration tests are good places to start.

Alexandre Dutra
October 28, 2015, 10:42 AM

A pull request is available; it has codec support for java.time API and java.util.Optional. I still need to check how these codecs interact with the mapper.

Fixed

Assignee

Alexandre Dutra

Reporter

T

Labels

None

PM Priority

A

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Priority

Minor
Configure