public interface JPQLFunction
extends com.holonplatform.core.Expression
Expression which represents a JPQL function.| Modifier and Type | Method and Description |
|---|---|
static JPQLFunction |
create(Function<List<String>,String> function)
Create a
JPQLFunction using given function as serialization logic. |
static JPQLFunction |
create(String name)
Create a default
JPQLFunction. |
static JPQLFunction |
create(String name,
boolean parenthesesIfNoArguments)
Create a default
JPQLFunction. |
static JPQLFunction |
extract(String partName)
Create an
EXTRACT function, which will be serialized this way:
EXTRACT(partName FROM argument). |
String |
serialize(List<String> arguments)
Serialize the function as JPQL.
|
default String |
serialize(String... arguments)
Serialize the function as JPQL.
|
String serialize(List<String> arguments) throws com.holonplatform.core.Expression.InvalidExpressionException
arguments - Optional function argumentsInvalidExpressionException - If the function arguments are not validcom.holonplatform.core.Expression.InvalidExpressionExceptiondefault String serialize(String... arguments)
arguments - Function argumentsstatic JPQLFunction create(Function<List<String>,String> function)
JPQLFunction using given function as serialization logic.function - Callback function (not null)JPQLFunction using given function for serializationstatic JPQLFunction create(String name, boolean parenthesesIfNoArguments)
JPQLFunction.name - Function name (not null)parenthesesIfNoArguments - Whether parentheses are required if there are no argumentsJPQLFunction with given namestatic JPQLFunction create(String name)
JPQLFunction. With this builder, parentheses are not added if there are no arguments.name - Function name (not null)JPQLFunction with given namestatic JPQLFunction extract(String partName)
EXTRACT function, which will be serialized this way:
EXTRACT(partName FROM argument).partName - The EXTRACT function part nameEXTRACT JPQLFunctionCopyright © 2019 The Holon Platform. All rights reserved.