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

public abstract Class AbstractScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>

extends AbstractStateObjectBuilder
implements IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder
Known Direct Subclasses
org.eclipse.persistence.jpa.jpql.tools.model.AbstractSelectExpressionStateObjectBuilder, org.eclipse.persistence.jpa.jpql.tools.model.AbstractSimpleSelectExpressionStateObjectBuilder, org.eclipse.persistence.jpa.jpql.tools.model.AbstractConditionalExpressionStateObjectBuilder, org.eclipse.persistence.jpa.jpql.tools.model.AbstractNewValueStateObjectBuilder
Annotations
@SuppressWarnings:unchecked, nls
Imports
java.lang.reflect.Array, java.util.ArrayList, .Collections, .List, org.eclipse.persistence.jpa.jpql.Assert, .ExpressionTools, org.eclipse.persistence.jpa.jpql.tools.model.query.AbsExpressionStateObject, .AdditionExpressionStateObject, .ArithmeticFactorStateObject, .AvgFunctionStateObject, .CoalesceExpressionStateObject, .CollectionValuedPathExpressionStateObject, .ConcatExpressionStateObject, .CountFunctionStateObject, .DateTimeStateObject, .DivisionExpressionStateObject, .EntityTypeLiteralStateObject, .EnumTypeStateObject, .FunctionExpressionStateObject, .IdentificationVariableStateObject, .IndexExpressionStateObject, .InputParameterStateObject, .LengthExpressionStateObject, .LocateExpressionStateObject, .MaxFunctionStateObject, .ModExpressionStateObject, .MultiplicationExpressionStateObject, .NullIfExpressionStateObject, .NumericLiteralStateObject, .SizeExpressionStateObject, .SqrtExpressionStateObject, .StateFieldPathExpressionStateObject, .StateObject, .StringLiteralStateObject, .SubExpressionStateObject, .SubtractionExpressionStateObject, .SumFunctionStateObject, .TypeExpressionStateObject

This abstract definition of a builder provides the support for creating expressions defined by a scalar expression.
Author
Pascal Filion
Since
2.4
Version
2.4

Field Summary

Modifier and TypeField and Description
private ICaseExpressionStateObjectBuilder
caseBuilder

Caches the ICaseExpressionStateObjectBuilder while it's been used.

private StateObject
parent

The parent of the expression to build, which is only required when a JPQL fragment needs to be parsed.

Constructor Summary

AccessConstructor and Description
protected
AbstractScalarExpressionStateObjectBuilder(StateObject
The parent of the expression to build, which is only required when a JPQL fragment needs to be parsed
parent
)

Creates a new AbstractScalarExpressionStateObjectBuilder.

Method Summary

Modifier and TypeMethod and Description
public T
abs(T
The parameter of the ABS expression
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.abs.

Creates the expression ABS(x).
public T
add(T
The right side of the addition expression
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.add.

Creates the expression x + y.
protected void
arithmetic(boolean plusSign)

protected void
avg(boolean distinct, String path)

public T
avg(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.avg.

Creates the expression AVG(path).
public T
avgDistinct(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.avgDistinct.

Creates the expression AVG(DISTINCT path).
protected StateObject
protected StateObject
protected StateObject
protected StateObject
protected StateObject
protected StateObject
protected StateObject
public T
public T
coalesce(T
The first scalar expression
builder1
,
T
The second scalar expression
builder2
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.coalesce.

Create the expression COALESCE(scalar_expression {, scalar_expression}+).
public T
coalesce(T
The first scalar expression
builder1
,
T
The second scalar expression
builder2
,
T[]
The subsequent scalar expressions
builders
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.coalesce.

Create the expression COALESCE(scalar_expression {, scalar_expression}+).
public T
concat(T
The first argument of the expression
builder1
,
T
The second argument of the expression
builder2
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.concat.

Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).
public T
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
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.concat.

Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).
protected void
count(boolean distinct, String path)

public T
count(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.count.

Creates the expression COUNT(identification_variable | state_field_path_expression | single_valued_object_path_expression).
public T
countDistinct(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.countDistinct.

Creates the expression COUNT(DISTINCT identification_variable | state_field_path_expression | single_valued_object_path_expression).
public T
public T
public T
public T
date(String jdbcDate)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.date.

Creates a new date using the JDBC syntax of a date.
public T
divide(T
The right side of the division expression
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.divide.

Creates the expression x / y.
public T
entityType(String
The short name of the entity
entityTypeName
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.entityType.

Creates a new entity type literal.
public T
enumLiteral(Enum<? extends Enum<?>>
The enum constant
enumConstant
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.enumLiteral.

Creates a new enum literal.
public T
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
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.function, org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.function.

Creates the expression <identifier>('functionName' {, expression}*).
public T
function(String
The JPQL identifier that is used to identify the SQL expression
identifier
,
String
The name of the native SQL function
functionName
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.function.

Creates the expression <identifier>('functionName' {, expression}*).
public T
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
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.function.

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

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.getCaseBuilder.

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

Returns:

The parent
getParent
()

Returns the parent of the expression to build, which is only required when a JPQL fragment needs to be parsed.

public T
index(String
The identification variable
variable
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.index.

Creates the expression INDEX(identification_variable).
public T
length(T
The encapsulated expression
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.length.

Creates the expression LENGTH(expression).
protected StateObject
literal(String literal)

protected List<StateObject>
literals(String... literals)

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

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.locate.

Creates the expression LOCATE(string_primary, string_primary).
public T
locate(T
The first string primary
parameter1
,
T
The second string primary
parameter2
,
T
The position of the search within the string
parameter3
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.locate.

Creates the expression LOCATE(string_primary, string_primary [, simple_arithmetic_expression]).
protected void
max(boolean distinct, String path)

public T
max(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.max.

Creates the expression MAX(path).
public T
maxDistinct(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.maxDistinct.

Creates the expression MAX(DISTINCT path).
protected void
min(boolean distinct, String path)

public T
min(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.min.

Creates the expression AVG(path).
public T
minDistinct(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.minDistinct.

Creates the expression AVG(DISTINCT path).
public T
minus(T
The expression that will have the plus sign prepended
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.minus.

Creates the expression - x.
public T
mod(T
The first parameter
parameter1
,
T
The second parameter
parameter2
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.mod.

Creates the expression MOD(simple_arithmetic_expression, simple_arithmetic_expression).
public T
multiply(T
The right side of the multiply expression
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.multiply.

Creates the expression x * y.
public T
nullIf(T
The first scalar expression
builder1
,
T
The second scalar expression
builder2
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.nullIf.

Create the expression NULLIF(scalar_expression, scalar_expression).
public T
numeric(Number
The numeric literal
number
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.numeric.

Creates the numeric literal.
public T
numeric(String
The numeric literal
number
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.numeric.

Creates the numeric literal.
public T
parameter(String
The named or positional input parameter
parameter
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.parameter.

Creates the input parameter.
public T
path(String
The state field path path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.path.

Creates a new state field path expression.
public T
plus(T
The expression that will have the plus sign prepended
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.plus.

Creates the expression + x.
public T
size(String
The collection-valued path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.size.

Creates the expression SIZE(collection_valued_path_expression).
public T
sqrt(T
The parameter of the ABS expression
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.sqrt.

Creates the expression SQRT(x).
protected List<StateObject>

Returns:

The list of StateObjects that were added to the stack
stateObjects
(int
The number of StateObjects to move to the list
count
)

Returns a list of the StateObjects that were previously created.

protected List<StateObject>

Returns:

The list of StateObjects that were added to the stack
stateObjects
(T...
The list of builders is used to determine how many StateObjects needs to be pulled out of the stack
builders
)

Returns a list of the StateObjects that were previously created.

public T
string(String
The string literal
literal
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.string.

Creates a new string literal.
public T
sub(T
The expression that will be encapsulated
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.sub.

Creates an encapsulated expression: (expression).
public T
subtract(T
The right side of the addition expression
builder
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.subtract.

Creates the expression x - y.
protected void
sum(boolean distinct, String path)

public T
sum(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.sum.

Creates the expression SUM(path).
public T
sumDistinct(String
The state field path expression
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.sumDistinct.

Creates the expression SUM(path).
public T
type(String
The identification variable or the input parameter
path
)

Implements org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder.type.

Creates the expression TYPE(identification_variable | single_valued_object_path_expression | input_parameter).
Inherited from org.eclipse.persistence.jpa.jpql.tools.model.AbstractStateObjectBuilder:
addcheckBuildercheckBuildershasStateObjectspop