org.hibernate.dialect.function
Interface SQLFunction

All Known Implementing Classes:
CastFunction, CharIndexFunction, NoArgSQLFunction, NvlFunction, PositionSubstringFunction, SQLFunctionTemplate, SQLServerDialect.TrimFunction, StandardSQLFunction, VarArgsSQLFunction

public interface SQLFunction

Provides support routines for the HQL functions as used in the various SQL Dialects Provides an interface for supporting various HQL functions that are translated to SQL. The Dialect and its sub-classes use this interface to provide details required for processing of the function.

Author:
David Channon

Method Summary
 Type getReturnType(Type columnType, Mapping mapping)
          The function return type
 boolean hasArguments()
          Does this function have any arguments?
 boolean hasParenthesesIfNoArguments()
          If there are no arguments, are parens required?
 String render(List args, SessionFactoryImplementor factory)
          Render the function call as SQL
 

Method Detail

getReturnType

public Type getReturnType(Type columnType,
                          Mapping mapping)
                   throws QueryException
The function return type

Parameters:
columnType - the type of the first argument
Throws:
QueryException

hasArguments

public boolean hasArguments()
Does this function have any arguments?


hasParenthesesIfNoArguments

public boolean hasParenthesesIfNoArguments()
If there are no arguments, are parens required?


render

public String render(List args,
                     SessionFactoryImplementor factory)
              throws QueryException
Render the function call as SQL

Throws:
QueryException