public final class JpqlFunctionGroup extends Object
JpqlFunction
s for various DBMSes under a single function name.Constructor | Description |
---|---|
JpqlFunctionGroup(String name) |
Constructs a non-aggregate function group with the given name.
|
JpqlFunctionGroup(String name,
boolean aggregate) |
Constructs a function group with the given name.
|
JpqlFunctionGroup(String name,
boolean aggregate,
Map<String,JpqlFunction> rdbmsFunctions) |
Constructs a function group with the given name and given function mappings.
|
JpqlFunctionGroup(String name,
JpqlFunction defaultFunction) |
Constructs a non-aggregate function group with the given name and given default function.
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(String rdbms,
JpqlFunction function) |
Adds the given
JpqlFunction for the given RDBMS to the group. |
boolean |
contains(String rdbms) |
Whether a
JpqlFunction for the given RDBMS name exists. |
JpqlFunction |
get(String rdbms) |
Returns the
JpqlFunction for the given RDBMS name. |
String |
getName() |
The name of the function.
|
boolean |
isAggregate() |
Whether the function is an aggregate.
|
public JpqlFunctionGroup(String name)
name
- The function namepublic JpqlFunctionGroup(String name, JpqlFunction defaultFunction)
name
- The function namedefaultFunction
- The default function to use when no specific function for a DBMS is availablepublic JpqlFunctionGroup(String name, boolean aggregate)
name
- The function nameaggregate
- True if the function is an aggregate function, false otherwisepublic JpqlFunctionGroup(String name, boolean aggregate, Map<String,JpqlFunction> rdbmsFunctions)
name
- The function nameaggregate
- True if the function is an aggregate function, false otherwiserdbmsFunctions
- The RDBMS functions in a mappublic String getName()
public boolean isAggregate()
public JpqlFunction get(String rdbms)
JpqlFunction
for the given RDBMS name.rdbms
- The RDBMS nameJpqlFunction
or nullpublic boolean contains(String rdbms)
JpqlFunction
for the given RDBMS name exists.rdbms
- The RDBMS namepublic void add(String rdbms, JpqlFunction function)
JpqlFunction
for the given RDBMS to the group.rdbms
- The RDBMS name for which to register the function or null to register the default functionfunction
- The JpqlFunction
to registerCopyright © 2014–2018 Blazebit. All rights reserved.