public class ConditionalParenthesisFunction extends StandardSQLFunction
StandardSQLFunction
,
except that here the parentheses are not included when no arguments are given.Constructor and Description |
---|
ConditionalParenthesisFunction(java.lang.String name)
Constructs a ConditionalParenthesisFunction with the given name
|
ConditionalParenthesisFunction(java.lang.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?
|
java.lang.String |
render(Type firstArgumentType,
java.util.List arguments,
SessionFactoryImplementor sessionFactory)
Render the function call as SQL fragment.
|
getName, getRenderedName, getReturnType, getType, hasArguments, toString
public ConditionalParenthesisFunction(java.lang.String name)
name
- The function namepublic ConditionalParenthesisFunction(java.lang.String name, Type type)
name
- The function nametype
- The function return typepublic boolean hasParenthesesIfNoArguments()
SQLFunction
hasParenthesesIfNoArguments
in interface SQLFunction
hasParenthesesIfNoArguments
in class StandardSQLFunction
public java.lang.String render(Type firstArgumentType, java.util.List arguments, SessionFactoryImplementor sessionFactory)
SQLFunction
SQLFunction.getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)
render
in interface SQLFunction
render
in class StandardSQLFunction
firstArgumentType
- The type of the first argumentarguments
- The function argumentssessionFactory
- The SessionFactoryCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.