Interface JdbcLiteralFormatter<T>
-
- Type Parameters:
T- the Java type that this instance formats as a SQL literal
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractJdbcLiteralFormatter,BasicJdbcLiteralFormatter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface JdbcLiteralFormatter<T> extends Serializable
A formatter object for rendering values of a given Java type as SQL literals of a certain JDBC/SQL type. Usually, an instance is obtained by callingJdbcType.getJdbcLiteralFormatter(JavaType).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidappendJdbcLiteral(SqlAppender appender, T value, Dialect dialect, WrapperOptions wrapperOptions)Append a SQL literal representing the given Java value to a fragment of SQL which is being built.default StringtoJdbcLiteral(T value, Dialect dialect, WrapperOptions wrapperOptions)Produces a string containing a SQL literal value representing the given Java value.
-
-
-
Method Detail
-
toJdbcLiteral
default String toJdbcLiteral(T value, Dialect dialect, WrapperOptions wrapperOptions)
Produces a string containing a SQL literal value representing the given Java value.- Parameters:
value- a Java object whose value can be represented as a SQL literaldialect- the SQL dialect- Returns:
- the SQL literal as a string
-
appendJdbcLiteral
void appendJdbcLiteral(SqlAppender appender, T value, Dialect dialect, WrapperOptions wrapperOptions)
Append a SQL literal representing the given Java value to a fragment of SQL which is being built.- Parameters:
appender- an operation that appends to the SQL fragmentvalue- a Java object whose value can be represented as a SQL literaldialect- the SQL dialect
-
-