public interface CustomTypeMarshaller<T, N, Q>
Interface for defining custom datastore types beyond the simple and association types supported out of the box.
T
- The target type to be marshalledN
- The native database typeQ
- The return type of the queryType Params | Return Type | Name and description |
---|---|---|
|
public java.lang.Class<T> |
getTargetType()
|
|
public Q |
query(PersistentProperty property, PropertyCriterion criterion, Q nativeQuery) Populates a query |
|
public T |
read(PersistentProperty property, N source) Converts a value from its native form |
|
public boolean |
supports(MappingContext context) Whether the marshaller supports the given datastore type |
|
public boolean |
supports(Datastore datastore)
|
|
public java.lang.Object |
write(PersistentProperty property, T value, N nativeTarget) Converts a value to its native form |
Populates a query
property
- The property being convertedcriterion
- The criterionnativeQuery
- The nativeQueryConverts a value from its native form
property
- The property being convertedsource
- The native formWhether the marshaller supports the given datastore type
context
- The context typeConverts a value to its native form
property
- The property being convertedvalue
- The valuenativeTarget
- The nativeTarget