Package org.hibernate.sql
Class Template
- java.lang.Object
-
- org.hibernate.sql.Template
-
public final class Template extends Object
Parses SQL fragments specified in mapping documents
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringrenderTransformerReadFragment(String fragment, String... columnNames)static StringrenderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect)Deprecated.Only intended for annotations usage; userenderWhereStringTemplate(String, String, Dialect, SqmFunctionRegistry)insteadstatic StringrenderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect, SqmFunctionRegistry functionRegistry)Takes the where condition provided in the mapping attribute and interpolates the alias.static StringrenderWhereStringTemplate(String sqlWhereString, Dialect dialect, SqmFunctionRegistry functionRegistry)
-
-
-
Field Detail
-
TEMPLATE
public static final String TEMPLATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
renderTransformerReadFragment
public static String renderTransformerReadFragment(String fragment, String... columnNames)
-
renderWhereStringTemplate
public static String renderWhereStringTemplate(String sqlWhereString, Dialect dialect, SqmFunctionRegistry functionRegistry)
-
renderWhereStringTemplate
@Deprecated public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect)
Deprecated.Only intended for annotations usage; userenderWhereStringTemplate(String, String, Dialect, SqmFunctionRegistry)insteadSame functionality asrenderWhereStringTemplate(String, String, Dialect, SqmFunctionRegistry), except that a SQLFunctionRegistry is not provided (i.e., only the dialect-defined functions are considered). This is only intended for use by the annotations project until the many-to-many/map-key-from-target-table feature is pulled into core.
-
renderWhereStringTemplate
public static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect, SqmFunctionRegistry functionRegistry)
Takes the where condition provided in the mapping attribute and interpolates the alias. Handles sub-selects, quoted identifiers, quoted strings, expressions, SQL functions, named parameters.- 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- Returns:
- The rendered sql fragment
-
-