|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.dialect.function.StandardSQLFunction
public class StandardSQLFunction
Provides a standard implementation that supports the majority of the HQL functions that are translated to SQL. The Dialect and its sub-classes use this class to provide details required for processing of the associated function.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
String |
getName()
Function name accessor |
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StandardSQLFunction(String name)
name
- The name of the function.public StandardSQLFunction(String name, Type registeredType)
name
- The name of the function.registeredType
- The static return type.Method Detail |
---|
public String getName()
public Type getType()
public boolean hasArguments()
hasArguments
in interface SQLFunction
public boolean hasParenthesesIfNoArguments()
hasParenthesesIfNoArguments
in interface SQLFunction
public Type getReturnType(Type firstArgumentType, Mapping mapping)
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.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 SessionFactory
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |