public interface SQLFunction
Provides support routines for the HQL functions as used in the various SQL Dialects
Provides an interface for supporting various HQL functions that are translated to SQL. The Dialect and its sub-classes use this interface to provide details required for processing of the function.
Modifier and Type | Method and Description |
---|---|
Type |
getReturnType(Type firstArgumentType,
Mapping mapping)
The return type of the function.
|
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 factory)
Render the function call as SQL fragment.
|
boolean hasArguments()
Does this function have any arguments?
boolean hasParenthesesIfNoArguments()
If there are no arguments, are parentheses required?
Type getReturnType(Type firstArgumentType, Mapping mapping) throws QueryException
The return type of the function. May be either a concrete type which is preset, or variable depending upon
the type of the first function argument.
<p/>
Note, the 'firstArgumentType' parameter should match the one passed into render(org.hibernate.type.Type, java.util.List, org.hibernate.engine.spi.SessionFactoryImplementor)
firstArgumentType
- The type of the first argumentmapping
- The mapping source.QueryException
- Indicates an issue resolving the return type.String render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) throws QueryException
Render the function call as SQL fragment.
<p/>
Note, the 'firstArgumentType' parameter should match the one passed into getReturnType(org.hibernate.type.Type, org.hibernate.engine.spi.Mapping)
firstArgumentType
- The type of the first argumentarguments
- The function argumentsfactory
- The SessionFactoryQueryException
- Indicates a problem rendering the
function call.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.