| Class | Description |
|---|---|
| AbstractTypeHandler<T> |
TypeHandler helper for String based JdbcType's conversion
|
| ESTDateTypeHandler |
SQL database saves all dates in EST time, (at least for Events + Surveys), however, on the java boxes that mybatis
runs on, the dates are in UTC time.
|
| JsonTypeHandler<T> |
MyBatis TypeHandler to convert to/from json and jsonb types
To use with Immutables you may need to map both the interface and the immutable class in the class that extends
this one, something like:
|
| URITypeHandler |
URI type handler
|
| UUIDObjectTypeHandler |
Add this type handler to your MyBatis SqlSessionFactory's configuration like so:
sessionFactory.getConfiguration()
.getTypeHandlerRegistry()
.register(UUID.class, UUIDObjectTypeHandler);
Unlike UUIDTypeHandler this expects the JDBC driver to have native support for the UUID type.
|
| UUIDTypeHandler |
Add this type handler to your MyBatis SqlSessionFactory's configuration like so:
sessionFactory.getConfiguration()
.getTypeHandlerRegistry()
.register(UUID.class, UUIDTypeHandler);
Or to use with default null-value
sessionFactory.getConfiguration()
.getTypeHandlerRegistry()
.register(UUID.class, new UUIDTypeHandler(new UUID(0L, 0L));
When MyBatis encounters a UUID property during the mapping process, it will use this
class to convert the result from the DB to a UUID.
|
Copyright © 2019. All rights reserved.