Interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
-
- All Known Subinterfaces:
IAbstractConditionalExpressionStateObjectBuilder<T>
,ICaseExpressionStateObjectBuilder
,IConditionalExpressionStateObjectBuilder
,IEclipseLinkConditionalStateObjectBuilder
,IEclipseLinkSelectExpressionStateObjectBuilder
,IEclipseLinkSimpleSelectExpressionStateObjectBuilder
,INewValueStateObjectBuilder
,ISelectExpressionStateObjectBuilder
,ISimpleSelectExpressionStateObjectBuilder
- All Known Implementing Classes:
AbstractCaseExpressionStateObjectBuilder
,AbstractConditionalExpressionStateObjectBuilder
,AbstractConditionalStateObjectBuilderWrapper
,AbstractEclipseLinkSelectExpressionStateObjectBuilder
,AbstractEclipseLinkSimpleSelectExpressionStateObjectBuilder
,AbstractNewValueStateObjectBuilder
,AbstractScalarExpressionStateObjectBuilder
,AbstractSelectExpressionStateObjectBuilder
,AbstractSimpleSelectExpressionStateObjectBuilder
,DefaultCaseExpressionStateObjectBuilder
,DefaultConditionalExpressionStateObjectBuilder
,DefaultNewValueStateObjectBuilder
,DefaultSelectExpressionStateObjectBuilder
,DefaultSimpleSelectExpressionStateObjectBuilder
,EclipseLinkConditionalStateObjectBuilder
,EclipseLinkSelectExpressionStateObjectBuilder
,EclipseLinkSimpleSelectExpressionStateObjectBuilder
public interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
This builder can be used to easily create a scalar expression without having to create each object manually.- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
abs(T builder)
Creates the expressionABS(x)
.T
add(T builder)
Creates the expressionx + y
.T
avg(java.lang.String path)
Creates the expressionAVG(path)
.T
avgDistinct(java.lang.String path)
Creates the expressionAVG(DISTINCT path)
.T
case_(ICaseExpressionStateObjectBuilder builder)
Creates a newCASE
expression.T
coalesce(T builder1, T builder2, T... builders)
Create the expressionCOALESCE(scalar_expression {, scalar_expression}+)
.T
concat(T builder1, T builder2, T... builders)
Creates the expressionCONCAT(string_primary, string_primary {, string_primary}*)
.T
count(java.lang.String path)
Creates the expressionCOUNT(identification_variable | state_field_path_expression | single_valued_object_path_expression)
.T
countDistinct(java.lang.String path)
Creates the expressionCOUNT(DISTINCT identification_variable | state_field_path_expression | single_valued_object_path_expression)
.T
currentDate()
Creates the expression representingCURRENT_DATE
.T
currentTime()
Creates the expression representingCURRENT_TIME
.T
currentTimestamp()
Creates the expression representingCURRENT_TIMESTAMP
.T
date(java.lang.String jdbcDate)
Creates a new date using the JDBC syntax of a date.T
divide(T builder)
Creates the expressionx / y
.T
entityType(java.lang.String entityTypeName)
Creates a new entity type literal.T
enumLiteral(java.lang.Enum<? extends java.lang.Enum<?>> enumConstant)
Creates a new enum literal.T
function(java.lang.String identifier, java.lang.String functionName, java.lang.String... arguments)
Creates the expression<identifier>('functionName' {, expression}*)
.T
function(java.lang.String identifier, java.lang.String functionName, T... arguments)
Creates the expression<identifier>('functionName' {, expression}*)
.ICaseExpressionStateObjectBuilder
getCaseBuilder()
Returns the builder that can create aCASE
expression, which requires aIConditionalExpressionStateObjectBuilder
to build theWHEN
clauses.T
index(java.lang.String variable)
Creates the expressionINDEX(identification_variable)
.T
length(T builder)
Creates the expressionLENGTH(expression)
.T
locate(T parameter1, T parameter2)
Creates the expressionLOCATE(string_primary, string_primary)
.T
locate(T parameter1, T parameter2, T parameter3)
Creates the expressionLOCATE(string_primary, string_primary [, simple_arithmetic_expression])
.T
max(java.lang.String path)
Creates the expressionMAX(path)
.T
maxDistinct(java.lang.String path)
Creates the expressionMAX(DISTINCT path)
.T
min(java.lang.String path)
Creates the expressionAVG(path)
.T
minDistinct(java.lang.String path)
Creates the expressionAVG(DISTINCT path)
.T
minus(T builder)
Creates the expression- x
.T
mod(T parameter1, T parameter2)
Creates the expressionMOD(simple_arithmetic_expression, simple_arithmetic_expression)
.T
multiply(T builder)
Creates the expressionx * y
.T
nullIf(T builder1, T builder2)
Create the expressionNULLIF(scalar_expression, scalar_expression)
.T
numeric(java.lang.Number number)
Creates the numeric literal.T
numeric(java.lang.String number)
Creates the numeric literal.T
parameter(java.lang.String parameter)
Creates the input parameter.T
path(java.lang.String path)
Creates a new state field path expression.T
plus(T builder)
Creates the expression+ x
.T
size(java.lang.String path)
Creates the expressionSIZE(collection_valued_path_expression)
.T
sqrt(T builder)
Creates the expressionSQRT(x)
.T
string(java.lang.String literal)
Creates a new string literal.T
sub(T builder)
Creates an encapsulated expression:(expression)
.T
subtract(T builder)
Creates the expressionx - y
.T
sum(java.lang.String path)
Creates the expressionSUM(path)
.T
sumDistinct(java.lang.String path)
Creates the expressionSUM(path)
.T
type(java.lang.String path)
Creates the expressionTYPE(identification_variable | single_valued_object_path_expression | input_parameter)
.
-
-
-
Method Detail
-
abs
T abs(T builder)
Creates the expressionABS(x)
.- Parameters:
builder
- The parameter of theABS
expression- Returns:
- This This builder
-
add
T add(T builder)
Creates the expressionx + y
.- Parameters:
builder
- The right side of the addition expression- Returns:
- This builder
-
avg
T avg(java.lang.String path)
Creates the expressionAVG(path)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
avgDistinct
T avgDistinct(java.lang.String path)
Creates the expressionAVG(DISTINCT path)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
case_
T case_(ICaseExpressionStateObjectBuilder builder)
Creates a newCASE
expression.- Parameters:
builder
- Thebuilder
of aCASE
expression- Returns:
- This This builder
-
coalesce
T coalesce(T builder1, T builder2, T... builders)
Create the expressionCOALESCE(scalar_expression {, scalar_expression}+)
.- Parameters:
builder1
- The first scalar expressionbuilder2
- The second scalar expressionbuilders
- The subsequent scalar expressions- Returns:
- This This builder
-
concat
T concat(T builder1, T builder2, T... builders)
Creates the expressionCONCAT(string_primary, string_primary {, string_primary}*)
.- Parameters:
builder1
- The first argument of the expressionbuilder2
- The second argument of the expressionbuilders
- The subsequence arguments of the expression, which are optional- Returns:
- This This builder
-
count
T count(java.lang.String path)
Creates the expressionCOUNT(identification_variable | state_field_path_expression | single_valued_object_path_expression)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
countDistinct
T countDistinct(java.lang.String path)
Creates the expressionCOUNT(DISTINCT identification_variable | state_field_path_expression | single_valued_object_path_expression)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
currentDate
T currentDate()
Creates the expression representingCURRENT_DATE
.- Returns:
- This This builder
-
currentTime
T currentTime()
Creates the expression representingCURRENT_TIME
.- Returns:
- This This builder
-
currentTimestamp
T currentTimestamp()
Creates the expression representingCURRENT_TIMESTAMP
.- Returns:
- This This builder
-
date
T date(java.lang.String jdbcDate)
Creates a new date using the JDBC syntax of a date.- Returns:
- This This builder
-
divide
T divide(T builder)
Creates the expressionx / y
.- Parameters:
builder
- The right side of the division expression- Returns:
- This This builder
-
entityType
T entityType(java.lang.String entityTypeName)
Creates a new entity type literal.- Parameters:
entityTypeName
- The short name of the entity- Returns:
- This This builder
-
enumLiteral
T enumLiteral(java.lang.Enum<? extends java.lang.Enum<?>> enumConstant)
Creates a new enum literal.- Parameters:
enumConstant
- The enum constant- Returns:
- This This builder
-
function
T function(java.lang.String identifier, java.lang.String functionName, java.lang.String... arguments)
Creates the expression<identifier>('functionName' {, expression}*)
.- Parameters:
identifier
- The JPQL identifier that is used to identify the SQL expressionfunctionName
- The name of the native SQL functionarguments
- The arguments of the expression- Returns:
- This builder
-
function
T function(java.lang.String identifier, java.lang.String functionName, T... arguments)
Creates the expression<identifier>('functionName' {, expression}*)
.- Parameters:
identifier
- The JPQL identifier that is used to identify the SQL expressionfunctionName
- The name of the native SQL functionarguments
- The arguments of the expression- Returns:
- This builder
-
getCaseBuilder
ICaseExpressionStateObjectBuilder getCaseBuilder()
Returns the builder that can create aCASE
expression, which requires aIConditionalExpressionStateObjectBuilder
to build theWHEN
clauses.- Returns:
- The builder of a
CASE
expression
-
index
T index(java.lang.String variable)
Creates the expressionINDEX(identification_variable)
.- Parameters:
variable
- The identification variable- Returns:
- This This builder
-
length
T length(T builder)
Creates the expressionLENGTH(expression)
.- Parameters:
builder
- The encapsulated expression- Returns:
- This This builder
-
locate
T locate(T parameter1, T parameter2)
Creates the expressionLOCATE(string_primary, string_primary)
.- Parameters:
parameter1
- The first string primaryparameter2
- The second string primary- Returns:
- This This builder
-
locate
T locate(T parameter1, T parameter2, T parameter3)
Creates the expressionLOCATE(string_primary, string_primary [, simple_arithmetic_expression])
.- Parameters:
parameter1
- The first string primaryparameter2
- The second string primaryparameter3
- The position of the search within the string- Returns:
- This This builder
-
max
T max(java.lang.String path)
Creates the expressionMAX(path)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
maxDistinct
T maxDistinct(java.lang.String path)
Creates the expressionMAX(DISTINCT path)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
min
T min(java.lang.String path)
Creates the expressionAVG(path)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
minDistinct
T minDistinct(java.lang.String path)
Creates the expressionAVG(DISTINCT path)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
minus
T minus(T builder)
Creates the expression- x
.- Parameters:
builder
- The expression that will have the plus sign prepended- Returns:
- This This builder
-
mod
T mod(T parameter1, T parameter2)
Creates the expressionMOD(simple_arithmetic_expression, simple_arithmetic_expression)
.- Parameters:
parameter1
- The first parameterparameter2
- The second parameter- Returns:
- This This builder
-
multiply
T multiply(T builder)
Creates the expressionx * y
.- Parameters:
builder
- The right side of the multiply expression- Returns:
- This This builder
-
nullIf
T nullIf(T builder1, T builder2)
Create the expressionNULLIF(scalar_expression, scalar_expression)
.- Parameters:
builder1
- The first scalar expressionbuilder2
- The second scalar expression- Returns:
- This This builder
-
numeric
T numeric(java.lang.Number number)
Creates the numeric literal.- Parameters:
number
- The numeric literal- Returns:
- This This builder
-
numeric
T numeric(java.lang.String number)
Creates the numeric literal.- Parameters:
number
- The numeric literal- Returns:
- This This builder
-
parameter
T parameter(java.lang.String parameter)
Creates the input parameter.- Parameters:
parameter
- The named or positional input parameter- Returns:
- This This builder
-
path
T path(java.lang.String path)
Creates a new state field path expression.- Parameters:
path
- The state field path path expression- Returns:
- This This builder
-
plus
T plus(T builder)
Creates the expression+ x
.- Parameters:
builder
- The expression that will have the plus sign prepended- Returns:
- This This builder
-
size
T size(java.lang.String path)
Creates the expressionSIZE(collection_valued_path_expression)
.- Parameters:
path
- The collection-valued path expression- Returns:
- This This builder
-
sqrt
T sqrt(T builder)
Creates the expressionSQRT(x)
.- Parameters:
builder
- The parameter of theABS
expression- Returns:
- This This builder
-
string
T string(java.lang.String literal)
Creates a new string literal.- Parameters:
literal
- The string literal- Returns:
- This This builder
-
sub
T sub(T builder)
Creates an encapsulated expression:(expression)
.- Parameters:
builder
- The expression that will be encapsulated- Returns:
- This This builder
-
subtract
T subtract(T builder)
Creates the expressionx - y
.- Parameters:
builder
- The right side of the addition expression- Returns:
- This This builder
-
sum
T sum(java.lang.String path)
Creates the expressionSUM(path)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
sumDistinct
T sumDistinct(java.lang.String path)
Creates the expressionSUM(path)
.- Parameters:
path
- The state field path expression- Returns:
- This This builder
-
type
T type(java.lang.String path)
Creates the expressionTYPE(identification_variable | single_valued_object_path_expression | input_parameter)
.- Parameters:
path
- The identification variable or the input parameter- Returns:
- This This builder
-
-