T
- The database type - i.e. any type available from
SQLDataType
U
- The user typepublic class Converters<T,U> extends Object implements Converter<T,U>
Modifier and Type | Method and Description |
---|---|
U |
from(T t)
Convert a database object to a user object
|
Class<T> |
fromType()
The database type
|
static <T> Converter<T,T> |
identity(Class<T> type)
Create an identity converter.
|
static <T,U> Converter<U,T> |
inverse(Converter<T,U> converter)
Inverse a converter.
|
static <T,U> Converter<T,U> |
of()
Create an identity converter.
|
static <T,X1,X2,X3,U> |
of(Converter<T,? extends X1> c1,
Converter<? super X1,? extends X2> c2,
Converter<? super X2,? extends X3> c3,
Converter<? super X3,U> c4)
Chain four converters.
|
static <T,X1,X2,U> |
of(Converter<T,? extends X1> c1,
Converter<? super X1,? extends X2> c2,
Converter<? super X2,U> c3)
Chain three converters.
|
static <T,X1,U> Converter<T,U> |
of(Converter<T,? extends X1> c1,
Converter<? super X1,U> c2)
Chain two converters.
|
static <T,U> Converter<T,U> |
of(Converter<T,U> converter)
Create a single converter.
|
T |
to(U u)
Convert a user object to a database object
|
String |
toString() |
Class<U> |
toType()
The user type
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
andThen, inverse, of, ofNullable
public static <T,U> Converter<T,U> of()
public static <T,X1,U> Converter<T,U> of(Converter<T,? extends X1> c1, Converter<? super X1,U> c2)
public static <T,X1,X2,U> Converter<T,U> of(Converter<T,? extends X1> c1, Converter<? super X1,? extends X2> c2, Converter<? super X2,U> c3)
public static <T,X1,X2,X3,U> Converter<T,U> of(Converter<T,? extends X1> c1, Converter<? super X1,? extends X2> c2, Converter<? super X2,? extends X3> c3, Converter<? super X3,U> c4)
public final U from(T t)
Converter
public final T to(U u)
Converter
public final Class<T> fromType()
Converter
Copyright © 2017. All Rights Reserved.