org.hibernate.dialect.function

Class NoArgSQLFunction

Implemented Interfaces:
SQLFunction

public class NoArgSQLFunction
extends java.lang.Object
implements SQLFunction

A function which takes no arguments
Author:
Michi

Constructor Summary

NoArgSQLFunction(String name, Type returnType)
NoArgSQLFunction(String name, Type returnType, boolean hasParenthesesIfNoArguments)

Method Summary

Type
getReturnType(Type columnType, Mapping mapping)
boolean
hasArguments()
boolean
hasParenthesesIfNoArguments()
String
render(List args, SessionFactoryImplementor factory)

Constructor Details

NoArgSQLFunction

public NoArgSQLFunction(String name,
                        Type returnType)

NoArgSQLFunction

public NoArgSQLFunction(String name,
                        Type returnType,
                        boolean hasParenthesesIfNoArguments)

Method Details

getReturnType

public Type getReturnType(Type columnType,
                          Mapping mapping)
            throws QueryException
Specified by:
getReturnType in interface SQLFunction

hasArguments

public boolean hasArguments()
Specified by:
hasArguments in interface SQLFunction

hasParenthesesIfNoArguments

public boolean hasParenthesesIfNoArguments()
Specified by:
hasParenthesesIfNoArguments in interface SQLFunction

render

public String render(List args,
                     SessionFactoryImplementor factory)
            throws QueryException
Specified by:
render in interface SQLFunction