public abstract class AbstractScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>> extends AbstractStateObjectBuilder implements IScalarExpressionStateObjectBuilder<T>
scalar expression
.Modifier and Type | Method and Description |
---|---|
T |
abs(T builder)
Creates the expression
ABS(x) . |
T |
add(T builder)
Creates the expression
x + y . |
T |
avg(String path)
Creates the expression
AVG(path) . |
T |
avgDistinct(String path)
Creates the expression
AVG(DISTINCT path) . |
T |
case_(ICaseExpressionStateObjectBuilder builder)
Creates a new
CASE expression. |
T |
coalesce(T builder1,
T builder2,
T... builders)
Create the expression
COALESCE(scalar_expression {, scalar_expression}+) . |
T |
concat(T builder1,
T builder2,
T... builders)
Creates the expression
CONCAT(string_primary, string_primary {, string_primary}*) . |
T |
count(String path)
Creates the expression
COUNT(identification_variable |
state_field_path_expression |
single_valued_object_path_expression) . |
T |
countDistinct(String path)
Creates the expression
COUNT(DISTINCT identification_variable |
state_field_path_expression |
single_valued_object_path_expression) . |
T |
currentDate()
Creates the expression representing
CURRENT_DATE . |
T |
currentTime()
Creates the expression representing
CURRENT_TIME . |
T |
currentTimestamp()
Creates the expression representing
CURRENT_TIMESTAMP . |
T |
date(String jdbcDate)
Creates a new date using the JDBC syntax of a date.
|
T |
divide(T builder)
Creates the expression
x / y . |
T |
entityType(String entityTypeName)
Creates a new entity type literal.
|
T |
enumLiteral(Enum<? extends Enum<?>> enumConstant)
Creates a new enum literal.
|
T |
function(String identifier,
String functionName,
String... arguments)
Creates the expression
<identifier>('functionName' {, expression}*) . |
T |
function(String identifier,
String functionName,
T... arguments)
Creates the expression
<identifier>('functionName' {, expression}*) . |
ICaseExpressionStateObjectBuilder |
getCaseBuilder()
Returns the builder that can create a
CASE expression, which requires a
IConditionalExpressionStateObjectBuilder to build the WHEN clauses. |
T |
index(String variable)
Creates the expression
INDEX(identification_variable) . |
T |
length(T builder)
Creates the expression
LENGTH(expression) . |
T |
locate(T parameter1,
T parameter2)
Creates the expression
LOCATE(string_primary, string_primary) . |
T |
locate(T parameter1,
T parameter2,
T parameter3)
Creates the expression
LOCATE(string_primary, string_primary [, simple_arithmetic_expression]) . |
T |
max(String path)
Creates the expression
MAX(path) . |
T |
maxDistinct(String path)
Creates the expression
MAX(DISTINCT path) . |
T |
min(String path)
Creates the expression
AVG(path) . |
T |
minDistinct(String path)
Creates the expression
AVG(DISTINCT path) . |
T |
minus(T builder)
Creates the expression
- x . |
T |
mod(T parameter1,
T parameter2)
Creates the expression
MOD(simple_arithmetic_expression, simple_arithmetic_expression) . |
T |
multiply(T builder)
Creates the expression
x * y . |
T |
nullIf(T builder1,
T builder2)
Create the expression
NULLIF(scalar_expression, scalar_expression) . |
T |
numeric(Number number)
Creates the numeric literal.
|
T |
numeric(String number)
Creates the numeric literal.
|
T |
parameter(String parameter)
Creates the input parameter.
|
T |
path(String path)
Creates a new state field path expression.
|
T |
plus(T builder)
Creates the expression
+ x . |
T |
size(String path)
Creates the expression
SIZE(collection_valued_path_expression) . |
T |
sqrt(T builder)
Creates the expression
SQRT(x) . |
T |
string(String literal)
Creates a new string literal.
|
T |
sub(T builder)
Creates an encapsulated expression:
(expression) . |
T |
subtract(T builder)
Creates the expression
x - y . |
T |
sum(String path)
Creates the expression
SUM(path) . |
T |
sumDistinct(String path)
Creates the expression
SUM(path) . |
T |
type(String path)
Creates the expression
TYPE(identification_variable | single_valued_object_path_expression | input_parameter) . |
public T abs(T builder)
ABS(x)
.abs
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The parameter of the ABS
expressionpublic T add(T builder)
x + y
.add
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The right side of the addition expressionpublic T avg(String path)
AVG(path)
.avg
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T avgDistinct(String path)
AVG(DISTINCT path)
.avgDistinct
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T case_(ICaseExpressionStateObjectBuilder builder)
CASE
expression.case_
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The builder
of a CASE
expressionpublic T coalesce(T builder1, T builder2, T... builders)
COALESCE(scalar_expression {, scalar_expression}+)
.coalesce
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder1
- The first scalar expressionbuilder2
- The second scalar expressionbuilders
- The subsequent scalar expressionspublic T concat(T builder1, T builder2, T... builders)
CONCAT(string_primary, string_primary {, string_primary}*)
.concat
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder1
- The first argument of the expressionbuilder2
- The second argument of the expressionbuilders
- The subsequence arguments of the expression, which are optionalpublic T count(String path)
COUNT(identification_variable |
state_field_path_expression |
single_valued_object_path_expression)
.count
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T countDistinct(String path)
COUNT(DISTINCT identification_variable |
state_field_path_expression |
single_valued_object_path_expression)
.countDistinct
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T currentDate()
CURRENT_DATE
.currentDate
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
public T currentTime()
CURRENT_TIME
.currentTime
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
public T currentTimestamp()
CURRENT_TIMESTAMP
.currentTimestamp
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
public T date(String jdbcDate)
date
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
public T divide(T builder)
x / y
.divide
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The right side of the division expressionpublic T entityType(String entityTypeName)
entityType
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
entityTypeName
- The short name of the entitypublic T enumLiteral(Enum<? extends Enum<?>> enumConstant)
enumLiteral
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
enumConstant
- The enum constantpublic T function(String identifier, String functionName, String... arguments)
<identifier>('functionName' {, expression}*)
.function
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
identifier
- The JPQL identifier that is used to identify the SQL expressionfunctionName
- The name of the native SQL functionarguments
- The arguments of the expressionpublic T function(String identifier, String functionName, T... arguments)
<identifier>('functionName' {, expression}*)
.function
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
identifier
- The JPQL identifier that is used to identify the SQL expressionfunctionName
- The name of the native SQL functionarguments
- The arguments of the expressionpublic ICaseExpressionStateObjectBuilder getCaseBuilder()
CASE
expression, which requires a
IConditionalExpressionStateObjectBuilder
to build the WHEN
clauses.getCaseBuilder
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
CASE
expressionpublic T index(String variable)
INDEX(identification_variable)
.index
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
variable
- The identification variablepublic T length(T builder)
LENGTH(expression)
.length
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The encapsulated expressionpublic T locate(T parameter1, T parameter2)
LOCATE(string_primary, string_primary)
.locate
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
parameter1
- The first string primaryparameter2
- The second string primarypublic T locate(T parameter1, T parameter2, T parameter3)
LOCATE(string_primary, string_primary [, simple_arithmetic_expression])
.locate
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
parameter1
- The first string primaryparameter2
- The second string primaryparameter3
- The position of the search within the stringpublic T max(String path)
MAX(path)
.max
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T maxDistinct(String path)
MAX(DISTINCT path)
.maxDistinct
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T min(String path)
AVG(path)
.min
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T minDistinct(String path)
AVG(DISTINCT path)
.minDistinct
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T minus(T builder)
- x
.minus
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The expression that will have the plus sign prependedpublic T mod(T parameter1, T parameter2)
MOD(simple_arithmetic_expression, simple_arithmetic_expression)
.mod
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
parameter1
- The first parameterparameter2
- The second parameterpublic T multiply(T builder)
x * y
.multiply
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The right side of the multiply expressionpublic T nullIf(T builder1, T builder2)
NULLIF(scalar_expression, scalar_expression)
.nullIf
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder1
- The first scalar expressionbuilder2
- The second scalar expressionpublic T numeric(Number number)
numeric
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
number
- The numeric literalpublic T numeric(String number)
numeric
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
number
- The numeric literalpublic T parameter(String parameter)
parameter
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
parameter
- The named or positional input parameterpublic T path(String path)
path
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path path expressionpublic T plus(T builder)
+ x
.plus
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The expression that will have the plus sign prependedpublic T size(String path)
SIZE(collection_valued_path_expression)
.size
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The collection-valued path expressionpublic T sqrt(T builder)
SQRT(x)
.sqrt
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The parameter of the ABS
expressionpublic T string(String literal)
string
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
literal
- The string literalpublic T sub(T builder)
(expression)
.sub
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The expression that will be encapsulatedpublic T subtract(T builder)
x - y
.subtract
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
builder
- The right side of the addition expressionpublic T sum(String path)
SUM(path)
.sum
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T sumDistinct(String path)
SUM(path)
.sumDistinct
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The state field path expressionpublic T type(String path)
TYPE(identification_variable | single_valued_object_path_expression | input_parameter)
.type
in interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
path
- The identification variable or the input parameter