This interface should be implemented by user-defined "types". A "type" class is
not the actual property type - it is a class that knows how to serialize instances of another class to and from JDBC.
This interface
- abstracts user code from future changes to the Type interface,
- simplifies the implementation of custom types and
- hides certain "internal" interfaces from user code.
Implementors must be immutable and must declare a public default constructor.
The actual class mapped by a
UserType may be just about anything.
CompositeUserType provides an extended version of this interface that is useful for more complex cases.
Alternatively, custom types could implement
Type directly or extend one of the abstract classes in
org.hibernate.type. This approach risks future incompatible changes to classes or interfaces in that package.
@see CompositeUserType for more complex cases
@see org.hibernate.type.Type
@author Gavin King