public class StandardSQLFunction extends Object implements SQLFunction
| Constructor and Description |
|---|
StandardSQLFunction(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(String name,
Type registeredType)
Construct a standard SQL function definition with a static return type.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Function name accessor
|
protected String |
getRenderedName(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?
|
String |
render(Type firstArgumentType,
List arguments,
SessionFactoryImplementor sessionFactory)
Render the function call as SQL fragment.
|
String |
toString() |
public StandardSQLFunction(String name)
name - The name of the function.public 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 String render(Type firstArgumentType, 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 SessionFactoryCopyright © 2001-2022 Red Hat, Inc. All Rights Reserved.