org.hibernate.sql
Class Template
java.lang.Object
org.hibernate.sql.Template
public final class Template
extends java.lang.Object
Parses SQL fragments specified in mapping documents
static String | renderOrderByStringTemplate(String sqlOrderByString, Dialect dialect, SQLFunctionRegistry functionRegistry) - Takes order by clause provided in the mapping attribute and interpolates the alias.
|
static String | renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect) - Only intended for annotations usage; use
renderWhereStringTemplate(String,String,Dialect,SQLFunctionRegistry) instead
|
static String | renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect, SQLFunctionRegistry functionRegistry) - Takes the where condition provided in the mapping attribute and interpolates the alias.
|
static String | renderWhereStringTemplate(String sqlWhereString, Dialect dialect, SQLFunctionRegistry functionRegistry)
|
TEMPLATE
public static final String TEMPLATE
renderOrderByStringTemplate
public static String renderOrderByStringTemplate(String sqlOrderByString,
Dialect dialect,
SQLFunctionRegistry functionRegistry)
Takes order by clause provided in the mapping attribute and interpolates the alias.
Handles asc, desc, SQL functions, quoted identifiers.
renderWhereStringTemplate
public static String renderWhereStringTemplate(String sqlWhereString,
String placeholder,
Dialect dialect,
SQLFunctionRegistry functionRegistry)
Takes the where condition provided in the mapping attribute and interpolates the alias.
Handles subselects, quoted identifiers, quoted strings, expressions, SQL functions,
named parameters.
sqlWhereString
- The string into which to interpolate the placeholder valueplaceholder
- The value to be interpolated into the the sqlWhereStringdialect
- The dialect to applyfunctionRegistry
- The registry of all sql functions
- The rendered sql fragment
renderWhereStringTemplate
public static String renderWhereStringTemplate(String sqlWhereString,
Dialect dialect,
SQLFunctionRegistry functionRegistry)