org.hibernate.sql
Class Template

java.lang.Object
  extended byorg.hibernate.sql.Template

public final class Template
extends Object

Parses SQL fragments specified in mapping documents

Author:
Gavin King

Field Summary
static String TEMPLATE
           
 
Method Summary
static String renderOrderByStringTemplate(String sqlOrderByString, Dialect dialect)
          Takes order by clause provided in the mapping attribute and interpolates the alias.
static String renderWhereStringTemplate(String sqlWhereString, Dialect dialect)
           
static String renderWhereStringTemplate(String sqlWhereString, String placeholder, Dialect dialect)
          Takes the where condition provided in the mapping attribute and interpolates the alias.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATE

public static final String TEMPLATE
See Also:
Constant Field Values
Method Detail

renderWhereStringTemplate

public static String renderWhereStringTemplate(String sqlWhereString,
                                               Dialect dialect)

renderWhereStringTemplate

public static String renderWhereStringTemplate(String sqlWhereString,
                                               String placeholder,
                                               Dialect dialect)
Takes the where condition provided in the mapping attribute and interpolates the alias. Handles subselects, quoted identifiers, quoted strings, expressions, SQL functions, named parameters.


renderOrderByStringTemplate

public static String renderOrderByStringTemplate(String sqlOrderByString,
                                                 Dialect dialect)
Takes order by clause provided in the mapping attribute and interpolates the alias. Handles asc, desc, SQL functions, quoted identifiers.