Interface PersistenceStringlyTypeHandler
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
PersistenceStringlyTypeHandlerCombined<T>
public interface PersistenceStringlyTypeHandler extends Serializable
A contract for defining conversions from and to string representations for a basic type.
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Field Summary
Fields Modifier and Type Field Description static PersistenceStringlyTypeHandlerINSTANCEA pass through handler. -
Method Summary
Modifier and Type Method Description default voidappendPersistenceConstructTo(StringBuilder sb, Consumer<StringBuilder> renderer)Renders the construction of the type to the string builder as JPQL.next expression.default booleanappendPersistenceDestructTo(StringBuilder sb, Function<StringBuilder,Boolean> renderer)Renders the destruction of the type to the string builder as JPQL.next expression.
-
Field Details
-
INSTANCE
A pass through handler.
-
-
Method Details
-
appendPersistenceConstructTo
Renders the construction of the type to the string builder as JPQL.next expression. This is used in the renderer of the constructor function and usually just renders the argument through, because it is assumed to be a string on the persistence side.- Parameters:
sb- The string builder into which to renderrenderer- The consumer that renders the argument to a string builder
-
appendPersistenceDestructTo
default boolean appendPersistenceDestructTo(StringBuilder sb, Function<StringBuilder,Boolean> renderer)Renders the destruction of the type to the string builder as JPQL.next expression. This is used in the renderer of the destructor function and usually just renders the argument through, because it is assumed to be a string on the persistence side.- Parameters:
sb- The string builder into which to renderrenderer- The consumer that renders the argument to a string builder- Returns:
- whether the rendered value is constant
-