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()
SQLFunction
hasArguments
in interface SQLFunction
public boolean hasParenthesesIfNoArguments()
SQLFunction
hasParenthesesIfNoArguments
in interface SQLFunction
public Type getReturnType(Type firstArgumentType, Mapping mapping)
SQLFunction
SQLFunction.render(org.hibernate.type.Type, java.util.List, org.hibernate.engine.spi.SessionFactoryImplementor)
getReturnType
in interface SQLFunction
firstArgumentType
- The type of the first argumentmapping
- The mapping source.public String render(Type firstArgumentType, List arguments, SessionFactoryImplementor sessionFactory)
SQLFunction
SQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)
render
in interface SQLFunction
firstArgumentType
- The type of the first argumentarguments
- The function argumentssessionFactory
- The SessionFactoryCopyright © 2018 JBoss by Red Hat. All rights reserved.