org.hibernate.dialect.function
Class VarArgsSQLFunction
java.lang.Object
org.hibernate.dialect.function.VarArgsSQLFunction
- SQLFunction
public class VarArgsSQLFunction
extends java.lang.Object
Support for slightly more general templating than
StandardSQLFunction
,
with an unlimited number of arguments.
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.
|
VarArgsSQLFunction
public VarArgsSQLFunction(String begin,
String sep,
String end)
Constructs a VarArgsSQLFunction instance with a 'dynamic' return type. For a dynamic return type,
the type of the arguments are used to resolve the type. An example of a function with a
'dynamic' return would be MAX or MIN which return a double or an integer etc
based on the types of the arguments.
begin
- The beginning of the function templating.sep
- The separator for each individual function argument.end
- The end of the function templating.
VarArgsSQLFunction
public VarArgsSQLFunction(Type type,
String begin,
String sep,
String end)
Constructs a VarArgsSQLFunction instance with a 'static' return type. An example of a 'static'
return type would be something like an UPPER function which is always returning
a SQL VARCHAR and thus a string type.
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.
transformArgument
protected String transformArgument(String argument)
argument
- The argument being processed.
- The transformed argument; may be the same, though should never be null.