public class StandardSQLFunction extends java.lang.Object implements SQLFunction
| Constructor and Description |
|---|
StandardSQLFunction(java.lang.String name)
Construct a standard SQL function definition with a variable return type;
the actual return type will depend on the types to which the function
is applied.
|
StandardSQLFunction(java.lang.String name,
Type registeredType)
Construct a standard SQL function definition with a static return type.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getName()
Function name accessor
|
protected java.lang.String |
getRenderedName(java.util.List arguments) |
Type |
getReturnType(Type firstArgumentType,
Mapping mapping)
The return type of the function.
|
Type |
getType()
Function static return type accessor.
|
boolean |
hasArguments()
Does this function have any arguments?
|
boolean |
hasParenthesesIfNoArguments()
If there are no arguments, are parentheses required?
|
java.lang.String |
render(Type firstArgumentType,
java.util.List arguments,
SessionFactoryImplementor sessionFactory)
Render the function call as SQL fragment.
|
java.lang.String |
toString() |
public StandardSQLFunction(java.lang.String name)
name - The name of the function.public StandardSQLFunction(java.lang.String name,
Type registeredType)
name - The name of the function.registeredType - The static return type.public java.lang.String getName()
public Type getType()
public boolean hasArguments()
SQLFunctionhasArguments in interface SQLFunctionpublic boolean hasParenthesesIfNoArguments()
SQLFunctionhasParenthesesIfNoArguments in interface SQLFunctionpublic Type getReturnType(Type firstArgumentType, Mapping mapping)
SQLFunctionSQLFunction.render(org.hibernate.type.Type, java.util.List, org.hibernate.engine.spi.SessionFactoryImplementor)getReturnType in interface SQLFunctionfirstArgumentType - The type of the first argumentmapping - The mapping source.public java.lang.String render(Type firstArgumentType, java.util.List arguments, SessionFactoryImplementor sessionFactory)
SQLFunctionSQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)render in interface SQLFunctionfirstArgumentType - The type of the first argumentarguments - The function argumentssessionFactory - The SessionFactoryprotected java.lang.String getRenderedName(java.util.List arguments)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.