Top Description Constructors Methods
org.hibernate.dialect.function

public Class ConditionalParenthesisFunction

extends StandardSQLFunction
Class Inheritance
Imports
java.util.List, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.type.Type

Essentially the same as org.hibernate.dialect.function.StandardSQLFunction, except that here the parentheses are not included when no arguments are given.
Author
Jonathan Levinson

Constructor Summary

AccessConstructor and Description
public
ConditionalParenthesisFunction(String
The function name
name
)

Constructs a ConditionalParenthesisFunction with the given name

public
ConditionalParenthesisFunction(String
The function name
name
,
Type
The function return type
type
)

Constructs a ConditionalParenthesisFunction with the given name

Method Summary

Modifier and TypeMethod and Description
public boolean
public String
render(Type
The type of the first argument
firstArgumentType
,
List<E>
The function arguments
arguments
,
SessionFactoryImplementor
The SessionFactory
sessionFactory
)

Overrides org.hibernate.dialect.function.StandardSQLFunction.render.

Implements org.hibernate.dialect.function.SQLFunction.render.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Render the function call as SQL fragment.
Inherited from org.hibernate.dialect.function.StandardSQLFunction:
getNamegetRenderedNamegetReturnTypegetTypehasArgumentstoString

Constructor Detail

ConditionalParenthesisFunctionback to summary
public ConditionalParenthesisFunction(String name)

Constructs a ConditionalParenthesisFunction with the given name

Parameters
name:String

The function name

ConditionalParenthesisFunctionback to summary
public ConditionalParenthesisFunction(String name, Type type)

Constructs a ConditionalParenthesisFunction with the given name

Parameters
name:String

The function name

type:Type

The function return type

Method Detail

hasParenthesesIfNoArgumentsback to summary
public boolean hasParenthesesIfNoArguments()

Overrides org.hibernate.dialect.function.StandardSQLFunction.hasParenthesesIfNoArguments.

Implements org.hibernate.dialect.function.SQLFunction.hasParenthesesIfNoArguments.

Doc from org.hibernate.dialect.function.SQLFunction.hasParenthesesIfNoArguments.

If there are no arguments, are parentheses required?

Returns:boolean

True if a no-arg call of this function requires parentheses.

Annotations
@Override
renderback to summary
public String render(Type firstArgumentType, List<E> arguments, SessionFactoryImplementor sessionFactory)

Overrides org.hibernate.dialect.function.StandardSQLFunction.render.

Implements org.hibernate.dialect.function.SQLFunction.render.

Doc from org.hibernate.dialect.function.SQLFunction.render.

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Render the function call as SQL fragment.

Note, the 'firstArgumentType' parameter should match the one passed into getReturnType

Parameters
firstArgumentType:Type

The type of the first argument

arguments:List<E>

The function arguments

sessionFactory:SessionFactoryImplementor

The SessionFactory

Returns:String

The rendered function call

Annotations
@Override