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 Details

  • Method Details

    • appendPersistenceConstructTo

      default void appendPersistenceConstructTo​(StringBuilder sb, Consumer<StringBuilder> renderer)
      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 render
      renderer - 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 render
      renderer - The consumer that renders the argument to a string builder
      Returns:
      whether the rendered value is constant