MyBatis type handlers for ThreeTen Extra (http://www.threeten.org/threeten-extra/)
Java Shell
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
travis
.gitignore
.travis.yml
LICENSE
README.md
license.txt
pom.xml

README.md

MyBatis Type Handlers for ThreeTen-Extra

Build Status Coverage Status Maven central License

mybatis

The MyBatis type handlers supporting types of ThreeTen-Extra.

Installation

If you are using Maven add the following dependency to your pom.xml:

<dependency>
  <groupId>org.mybatis</groupId>
  <artifactId>mybatis-typehandlers-threeten-extra</artifactId>
  <version>1.0.0</version>
</dependency>

If you are using Gradle add the following dependency to your build.gradle:

compile("org.mybatis:mybatis-typehandlers-threeten-extra:1.0.0")

Configuration

Add following configuration to your mybatis-config.xml:

<typeHandlers>
  <!-- ... -->
  <package name="org.mybatis.typehandlers.threetenextra"/>
</typeHandlers>

Supported types

The following type handlers are supported:

Type handler ThreeTen-Extra type JDBC types
DayOfMonthTypeHandler org.threeten.extra.DayOfMonth INTEGER
DayOfYearTypeHandler org.threeten.extra.DayOfYear INTEGER
SecondsTypeHandler org.threeten.extra.Seconds INTEGER
MinutesTypeHandler org.threeten.extra.Minutes INTEGER
HoursTypeHandler org.threeten.extra.Hours INTEGER
DaysTypeHandler org.threeten.extra.Days INTEGER
WeeksTypeHandler org.threeten.extra.Weeks INTEGER
MonthsTypeHandler org.threeten.extra.Months INTEGER
YearsTypeHandler org.threeten.extra.Years INTEGER
YearWeekTypeHandler org.threeten.extra.YearWeek VARCHAR or LONGVARCHAR
YearQuarterTypeHandler org.threeten.extra.YearQuarter VARCHAR or LONGVARCHAR

Note:

For more details of type handler, please refer to "MyBatis 3 REFERENCE DOCUMENTATION".