|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.dialect.function.VarArgsSQLFunction
public class VarArgsSQLFunction
Support for slightly more general templating than StandardSQLFunction
,
with an unlimited number of arguments.
Constructor Summary | |
---|---|
VarArgsSQLFunction(String begin,
String sep,
String end)
Constructs a VarArgsSQLFunction instance with a 'dynamic' return type. |
|
VarArgsSQLFunction(Type type,
String begin,
String sep,
String end)
Constructs a VarArgsSQLFunction instance with a 'static' return type. |
Method Summary | |
---|---|
Type |
getReturnType(Type columnType,
Mapping mapping)
The return type of the function. |
boolean |
hasArguments()
Does this function have any arguments? |
boolean |
hasParenthesesIfNoArguments()
If there are no arguments, are parens required? |
String |
render(List args,
SessionFactoryImplementor factory)
Render the function call as SQL fragment. |
protected String |
transformArgument(String argument)
Called from render(java.util.List, org.hibernate.engine.SessionFactoryImplementor) to allow applying a change or transformation to each individual
argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VarArgsSQLFunction(Type type, String begin, String sep, String end)
type
- The return type.begin
- The beginning of the function templating.sep
- The separator for each individual function argument.end
- The end of the function templating.public VarArgsSQLFunction(String begin, String sep, String end)
begin
- The beginning of the function templating.sep
- The separator for each individual function argument.end
- The end of the function templating.Specifically, the 'columnType' argument is the 'dynamic' type.
Method Detail |
---|
public Type getReturnType(Type columnType, Mapping mapping) throws QueryException
getReturnType
in interface SQLFunction
columnType
- the type of the first argumentmapping
- The mapping source.
QueryException
- Indicates an issue resolving the return type.public boolean hasArguments()
hasArguments
in interface SQLFunction
public boolean hasParenthesesIfNoArguments()
hasParenthesesIfNoArguments
in interface SQLFunction
public String render(List args, SessionFactoryImplementor factory) throws QueryException
render
in interface SQLFunction
args
- The function argumentsfactory
- The SessionFactory
QueryException
- Indicates a problem rendering the
function call.protected String transformArgument(String argument)
render(java.util.List, org.hibernate.engine.SessionFactoryImplementor)
to allow applying a change or transformation to each individual
argument.
argument
- The argument being processed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |