public class ConditionalParenthesisFunction extends StandardSQLFunction
Essentially the same as StandardSQLFunction,
except that here the parentheses are not included when no arguments are given.
| Constructor and Description |
|---|
ConditionalParenthesisFunction(String name)
Constructs a ConditionalParenthesisFunction with the given name
|
ConditionalParenthesisFunction(String name,
Type type)
Constructs a ConditionalParenthesisFunction with the given name
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getName, getRenderedName, getReturnType, getType, hasArguments, toStringpublic ConditionalParenthesisFunction(String name)
Constructs a ConditionalParenthesisFunction with the given name
name - The function namepublic boolean hasParenthesesIfNoArguments()
SQLFunctionIf there are no arguments, are parentheses required?
hasParenthesesIfNoArguments in interface SQLFunctionhasParenthesesIfNoArguments in class StandardSQLFunctionpublic String render(Type firstArgumentType, List arguments, SessionFactoryImplementor sessionFactory)
SQLFunctionRender the function call as SQL fragment.
<p/>
Note, the 'firstArgumentType' parameter should match the one passed into SQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)
render in interface SQLFunctionrender in class StandardSQLFunctionfirstArgumentType - The type of the first argumentarguments - The function argumentssessionFactory - The SessionFactoryCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.