Top Description Methods
org.eclipse.persistence.jpa.jpql.tools.model

public Interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>

Known Direct Subinterfaces
org.eclipse.persistence.jpa.jpql.tools.model.ISelectExpressionStateObjectBuilder, org.eclipse.persistence.jpa.jpql.tools.model.ISimpleSelectExpressionStateObjectBuilder, org.eclipse.persistence.jpa.jpql.tools.model.IAbstractConditionalExpressionStateObjectBuilder, org.eclipse.persistence.jpa.jpql.tools.model.INewValueStateObjectBuilder
Known Direct Implementers
org.eclipse.persistence.jpa.jpql.tools.model.AbstractScalarExpressionStateObjectBuilder

This builder can be used to easily create a scalar expression without having to create each object manually.
Author
Pascal Filion
Since
2.4
Version
2.4

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

This builder
abs
(T
The parameter of the ABS expression
builder
)

Creates the expression ABS(x).

public T

Returns:

This builder
add
(T
The right side of the addition expression
builder
)

Creates the expression x + y.

public T

Returns:

This builder
avg
(String
The state field path expression
path
)

Creates the expression AVG(path).

public T

Returns:

This builder
avgDistinct
(String
The state field path expression
path
)

Creates the expression AVG(DISTINCT path).

public T

Returns:

This builder
case_
(ICaseExpressionStateObjectBuilder
The builder of a CASE expression
builder
)

Creates a new CASE expression.

public T

Returns:

This builder
coalesce
(T
The first scalar expression
builder1
,
T
The second scalar expression
builder2
)

Create the expression COALESCE(scalar_expression {, scalar_expression}+).

public T

Returns:

This builder
coalesce
(T
The first scalar expression
builder1
,
T
The second scalar expression
builder2
,
T[]
The subsequent scalar expressions
builders
)

Create the expression COALESCE(scalar_expression {, scalar_expression}+).

public T

Returns:

This builder
concat
(T
The first argument of the expression
builder1
,
T
The second argument of the expression
builder2
)

Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).

public T

Returns:

This builder
concat
(T
The first argument of the expression
builder1
,
T
The second argument of the expression
builder2
,
T[]
The subsequence arguments of the expression, which are optional
builders
)

Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).

public T

Returns:

This builder
count
(String
The state field path expression
path
)

Creates the expression COUNT(identification_variable | state_field_path_expression | single_valued_object_path_expression).

public T

Returns:

This builder
countDistinct
(String
The state field path expression
path
)

Creates the expression COUNT(DISTINCT identification_variable | state_field_path_expression | single_valued_object_path_expression).

public T

Returns:

This builder
currentDate
()

Creates the expression representing CURRENT_DATE.

public T

Returns:

This builder
currentTime
()

Creates the expression representing CURRENT_TIME.

public T

Returns:

This builder
currentTimestamp
()

Creates the expression representing CURRENT_TIMESTAMP.

public T

Returns:

This builder
date
(String jdbcDate)

Creates a new date using the JDBC syntax of a date.

public T

Returns:

This builder
divide
(T
The right side of the division expression
builder
)

Creates the expression x / y.

public T

Returns:

This builder
entityType
(String
The short name of the entity
entityTypeName
)

Creates a new entity type literal.

public T

Returns:

This builder
enumLiteral
(Enum<? extends Enum<?>>
The enum constant
enumConstant
)

Creates a new enum literal.

public T

Returns:

This builder
function
(String
The JPQL identifier that is used to identify the SQL expression
identifier
,
String
The name of the native SQL function
functionName
,
String...
The arguments of the expression
arguments
)

Creates the expression <identifier>('functionName' {, expression}*).

public T

Returns:

This builder
function
(String
The JPQL identifier that is used to identify the SQL expression
identifier
,
String
The name of the native SQL function
functionName
)

Creates the expression <identifier>('functionName' {, expression}*).

public T

Returns:

This builder
function
(String
The JPQL identifier that is used to identify the SQL expression
identifier
,
String
The name of the native SQL function
functionName
,
T[]
The arguments of the expression
arguments
)

Creates the expression <identifier>('functionName' {, expression}*).

public ICaseExpressionStateObjectBuilder

Returns:

The builder of a CASE expression
getCaseBuilder
()

Returns the builder that can create a CASE expression, which requires a IConditionalExpressionStateObjectBuilder to build the WHEN clauses.

public T

Returns:

This builder
index
(String
The identification variable
variable
)

Creates the expression INDEX(identification_variable).

public T

Returns:

This builder
length
(T
The encapsulated expression
builder
)

Creates the expression LENGTH(expression).

public T

Returns:

This builder
locate
(T
The first string primary
parameter1
,
T
The second string primary
parameter2
)

Creates the expression LOCATE(string_primary, string_primary).

public T

Returns:

This builder
locate
(T
The first string primary
parameter1
,
T
The second string primary
parameter2
,
T
The position of the search within the string
parameter3
)

Creates the expression LOCATE(string_primary, string_primary [, simple_arithmetic_expression]).

public T

Returns:

This builder
max
(String
The state field path expression
path
)

Creates the expression MAX(path).

public T

Returns:

This builder
maxDistinct
(String
The state field path expression
path
)

Creates the expression MAX(DISTINCT path).

public T

Returns:

This builder
min
(String
The state field path expression
path
)

Creates the expression AVG(path).

public T

Returns:

This builder
minDistinct
(String
The state field path expression
path
)

Creates the expression AVG(DISTINCT path).

public T

Returns:

This builder
minus
(T
The expression that will have the plus sign prepended
builder
)

Creates the expression - x.

public T

Returns:

This builder
mod
(T
The first parameter
parameter1
,
T
The second parameter
parameter2
)

Creates the expression MOD(simple_arithmetic_expression, simple_arithmetic_expression).

public T

Returns:

This builder
multiply
(T
The right side of the multiply expression
builder
)

Creates the expression x * y.

public T

Returns:

This builder
nullIf
(T
The first scalar expression
builder1
,
T
The second scalar expression
builder2
)

Create the expression NULLIF(scalar_expression, scalar_expression).

public T

Returns:

This builder
numeric
(Number
The numeric literal
number
)

Creates the numeric literal.

public T

Returns:

This builder
numeric
(String
The numeric literal
number
)

Creates the numeric literal.

public T

Returns:

This builder
parameter
(String
The named or positional input parameter
parameter
)

Creates the input parameter.

public T

Returns:

This builder
path
(String
The state field path path expression
path
)

Creates a new state field path expression.

public T

Returns:

This builder
plus
(T
The expression that will have the plus sign prepended
builder
)

Creates the expression + x.

public T

Returns:

This builder
size
(String
The collection-valued path expression
path
)

Creates the expression SIZE(collection_valued_path_expression).

public T

Returns:

This builder
sqrt
(T
The parameter of the ABS expression
builder
)

Creates the expression SQRT(x).

public T

Returns:

This builder
string
(String
The string literal
literal
)

Creates a new string literal.

public T

Returns:

This builder
sub
(T
The expression that will be encapsulated
builder
)

Creates an encapsulated expression: (expression).

public T

Returns:

This builder
subtract
(T
The right side of the addition expression
builder
)

Creates the expression x - y.

public T

Returns:

This builder
sum
(String
The state field path expression
path
)

Creates the expression SUM(path).

public T

Returns:

This builder
sumDistinct
(String
The state field path expression
path
)

Creates the expression SUM(path).

public T

Returns:

This builder
type
(String
The identification variable or the input parameter
path
)

Creates the expression TYPE(identification_variable | single_valued_object_path_expression | input_parameter).

Method Detail

absback to summary
public T abs(T builder)

Creates the expression ABS(x).

Parameters
builder:T

The parameter of the ABS expression

Returns:T

This builder

addback to summary
public T add(T builder)

Creates the expression x + y.

Parameters
builder:T

The right side of the addition expression

Returns:T

This builder

avgback to summary
public T avg(String path)

Creates the expression AVG(path).

Parameters
path:String

The state field path expression

Returns:T

This builder

avgDistinctback to summary
public T avgDistinct(String path)

Creates the expression AVG(DISTINCT path).

Parameters
path:String

The state field path expression

Returns:T

This builder

case_back to summary
public T case_(ICaseExpressionStateObjectBuilder builder)

Creates a new CASE expression.

Parameters
builder:ICaseExpressionStateObjectBuilder

The builder of a CASE expression

Returns:T

This builder

coalesceback to summary
public T coalesce(T builder1, T builder2)

Create the expression COALESCE(scalar_expression {, scalar_expression}+).

Parameters
builder1:T

The first scalar expression

builder2:T

The second scalar expression

Returns:T

This builder

coalesceback to summary
public T coalesce(T builder1, T builder2, T[] builders)

Create the expression COALESCE(scalar_expression {, scalar_expression}+).

Parameters
builder1:T

The first scalar expression

builder2:T

The second scalar expression

builders:T[]

The subsequent scalar expressions

Returns:T

This builder

concatback to summary
public T concat(T builder1, T builder2)

Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).

Parameters
builder1:T

The first argument of the expression

builder2:T

The second argument of the expression

Returns:T

This builder

concatback to summary
public T concat(T builder1, T builder2, T[] builders)

Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).

Parameters
builder1:T

The first argument of the expression

builder2:T

The second argument of the expression

builders:T[]

The subsequence arguments of the expression, which are optional

Returns:T

This builder

countback to summary
public T count(String path)

Creates the expression COUNT(identification_variable | state_field_path_expression | single_valued_object_path_expression).

Parameters
path:String

The state field path expression

Returns:T

This builder

countDistinctback to summary
public T countDistinct(String path)

Creates the expression COUNT(DISTINCT identification_variable | state_field_path_expression | single_valued_object_path_expression).

Parameters
path:String

The state field path expression

Returns:T

This builder

currentDateback to summary
public T currentDate()

Creates the expression representing CURRENT_DATE.

Returns:T

This builder

currentTimeback to summary
public T currentTime()

Creates the expression representing CURRENT_TIME.

Returns:T

This builder

currentTimestampback to summary
public T currentTimestamp()

Creates the expression representing CURRENT_TIMESTAMP.

Returns:T

This builder

dateback to summary
public T date(String jdbcDate)

Creates a new date using the JDBC syntax of a date.

Returns:T

This builder

divideback to summary
public T divide(T builder)

Creates the expression x / y.

Parameters
builder:T

The right side of the division expression

Returns:T

This builder

entityTypeback to summary
public T entityType(String entityTypeName)

Creates a new entity type literal.

Parameters
entityTypeName:String

The short name of the entity

Returns:T

This builder

enumLiteralback to summary
public T enumLiteral(Enum<? extends Enum<?>> enumConstant)

Creates a new enum literal.

Parameters
enumConstant:Enum<? extends Enum<?>>

The enum constant

Returns:T

This builder

functionback to summary
public T function(String identifier, String functionName, String... arguments)

Creates the expression <identifier>('functionName' {, expression}*).

Parameters
identifier:String

The JPQL identifier that is used to identify the SQL expression

functionName:String

The name of the native SQL function

arguments:String[]

The arguments of the expression

Returns:T

This builder

functionback to summary
public T function(String identifier, String functionName)

Creates the expression <identifier>('functionName' {, expression}*).

Parameters
identifier:String

The JPQL identifier that is used to identify the SQL expression

functionName:String

The name of the native SQL function

Returns:T

This builder

functionback to summary
public T function(String identifier, String functionName, T[] arguments)

Creates the expression <identifier>('functionName' {, expression}*).

Parameters
identifier:String

The JPQL identifier that is used to identify the SQL expression

functionName:String

The name of the native SQL function

arguments:T[]

The arguments of the expression

Returns:T

This builder

getCaseBuilderback to summary
public ICaseExpressionStateObjectBuilder getCaseBuilder()

Returns the builder that can create a CASE expression, which requires a IConditionalExpressionStateObjectBuilder to build the WHEN clauses.

Returns:ICaseExpressionStateObjectBuilder

The builder of a CASE expression

indexback to summary
public T index(String variable)

Creates the expression INDEX(identification_variable).

Parameters
variable:String

The identification variable

Returns:T

This builder

lengthback to summary
public T length(T builder)

Creates the expression LENGTH(expression).

Parameters
builder:T

The encapsulated expression

Returns:T

This builder

locateback to summary
public T locate(T parameter1, T parameter2)

Creates the expression LOCATE(string_primary, string_primary).

Parameters
parameter1:T

The first string primary

parameter2:T

The second string primary

Returns:T

This builder

locateback to summary
public T locate(T parameter1, T parameter2, T parameter3)

Creates the expression LOCATE(string_primary, string_primary [, simple_arithmetic_expression]).

Parameters
parameter1:T

The first string primary

parameter2:T

The second string primary

parameter3:T

The position of the search within the string

Returns:T

This builder

maxback to summary
public T max(String path)

Creates the expression MAX(path).

Parameters
path:String

The state field path expression

Returns:T

This builder

maxDistinctback to summary
public T maxDistinct(String path)

Creates the expression MAX(DISTINCT path).

Parameters
path:String

The state field path expression

Returns:T

This builder

minback to summary
public T min(String path)

Creates the expression AVG(path).

Parameters
path:String

The state field path expression

Returns:T

This builder

minDistinctback to summary
public T minDistinct(String path)

Creates the expression AVG(DISTINCT path).

Parameters
path:String

The state field path expression

Returns:T

This builder

minusback to summary
public T minus(T builder)

Creates the expression - x.

Parameters
builder:T

The expression that will have the plus sign prepended

Returns:T

This builder

modback to summary
public T mod(T parameter1, T parameter2)

Creates the expression MOD(simple_arithmetic_expression, simple_arithmetic_expression).

Parameters
parameter1:T

The first parameter

parameter2:T

The second parameter

Returns:T

This builder

multiplyback to summary
public T multiply(T builder)

Creates the expression x * y.

Parameters
builder:T

The right side of the multiply expression

Returns:T

This builder

nullIfback to summary
public T nullIf(T builder1, T builder2)

Create the expression NULLIF(scalar_expression, scalar_expression).

Parameters
builder1:T

The first scalar expression

builder2:T

The second scalar expression

Returns:T

This builder

numericback to summary
public T numeric(Number number)

Creates the numeric literal.

Parameters
number:Number

The numeric literal

Returns:T

This builder

numericback to summary
public T numeric(String number)

Creates the numeric literal.

Parameters
number:String

The numeric literal

Returns:T

This builder

parameterback to summary
public T parameter(String parameter)

Creates the input parameter.

Parameters
parameter:String

The named or positional input parameter

Returns:T

This builder

pathback to summary
public T path(String path)

Creates a new state field path expression.

Parameters
path:String

The state field path path expression

Returns:T

This builder

plusback to summary
public T plus(T builder)

Creates the expression + x.

Parameters
builder:T

The expression that will have the plus sign prepended

Returns:T

This builder

sizeback to summary
public T size(String path)

Creates the expression SIZE(collection_valued_path_expression).

Parameters
path:String

The collection-valued path expression

Returns:T

This builder

sqrtback to summary
public T sqrt(T builder)

Creates the expression SQRT(x).

Parameters
builder:T

The parameter of the ABS expression

Returns:T

This builder

stringback to summary
public T string(String literal)

Creates a new string literal.

Parameters
literal:String

The string literal

Returns:T

This builder

subback to summary
public T sub(T builder)

Creates an encapsulated expression: (expression).

Parameters
builder:T

The expression that will be encapsulated

Returns:T

This builder

subtractback to summary
public T subtract(T builder)

Creates the expression x - y.

Parameters
builder:T

The right side of the addition expression

Returns:T

This builder

sumback to summary
public T sum(String path)

Creates the expression SUM(path).

Parameters
path:String

The state field path expression

Returns:T

This builder

sumDistinctback to summary
public T sumDistinct(String path)

Creates the expression SUM(path).

Parameters
path:String

The state field path expression

Returns:T

This builder

typeback to summary
public T type(String path)

Creates the expression TYPE(identification_variable | single_valued_object_path_expression | input_parameter).

Parameters
path:String

The identification variable or the input parameter

Returns:T

This builder