Class AbstractSelectExpressionStateObjectBuilder
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.AbstractStateObjectBuilder
org.eclipse.persistence.jpa.jpql.tools.model.AbstractScalarExpressionStateObjectBuilder<ISelectExpressionStateObjectBuilder>
org.eclipse.persistence.jpa.jpql.tools.model.AbstractSelectExpressionStateObjectBuilder
- All Implemented Interfaces:
IScalarExpressionStateObjectBuilder<ISelectExpressionStateObjectBuilder>
,ISelectExpressionStateObjectBuilder
- Direct Known Subclasses:
AbstractEclipseLinkSelectExpressionStateObjectBuilder
,DefaultSelectExpressionStateObjectBuilder
public abstract class AbstractSelectExpressionStateObjectBuilder
extends AbstractScalarExpressionStateObjectBuilder<ISelectExpressionStateObjectBuilder>
implements ISelectExpressionStateObjectBuilder
- Since:
- 2.4
- Version:
- 2.4
-
Field Summary
Modifier and TypeFieldDescriptionprotected List
<StateObject> The list of select items, which were added by invokingappend()
. -
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a newAbstractSelectExpressionStateObjectBuilder
. -
Method Summary
Modifier and TypeMethodDescriptionappend()
Appends the previously created select item and starts a new stack to create a new select item.void
commit()
Pushes the changes created by this builder to the state object.protected SelectClauseStateObject
Returns the parent of the expression to build, which is only required when a JPQL fragment needs to be parsed.new_
(String className, ISelectExpressionStateObjectBuilder... parameters) Creates the expressionNEW constructor_name(identification_variable)
.Creates the expressionOBJECT(identification_variable)
.resultVariable
(String resultVariable) Defines the current state object with the given result variable.protected void
resultVariable
(String resultVariable, boolean as) resultVariableAs
(String resultVariable) Defines the current state object with the given result variable.Creates the expression representing an identification variable.Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.AbstractScalarExpressionStateObjectBuilder
abs, add, arithmetic, avg, avg, avgDistinct, buildCollectionPath, buildIdentificationVariable, buildInputParameter, buildNumeric, buildNumeric, buildStateFieldPath, buildStringLiteral, case_, coalesce, coalesce, concat, concat, count, count, countDistinct, currentDate, currentTime, currentTimestamp, date, divide, entityType, enumLiteral, function, function, function, getCaseBuilder, index, length, literal, literals, locate, locate, max, max, maxDistinct, min, min, minDistinct, minus, mod, multiply, nullIf, numeric, numeric, parameter, path, plus, size, sqrt, stateObjects, stateObjects, string, sub, subtract, sum, sum, sumDistinct, type
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.model.AbstractStateObjectBuilder
add, checkBuilder, checkBuilders, hasStateObjects, pop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.jpa.jpql.tools.model.IScalarExpressionStateObjectBuilder
abs, add, avg, avgDistinct, case_, coalesce, coalesce, concat, concat, count, countDistinct, currentDate, currentTime, currentTimestamp, date, divide, entityType, enumLiteral, function, function, function, getCaseBuilder, index, length, locate, locate, max, maxDistinct, min, minDistinct, minus, mod, multiply, nullIf, numeric, numeric, parameter, path, plus, size, sqrt, string, sub, subtract, sum, sumDistinct, type
-
Field Details
-
stateObjectList
The list of select items, which were added by invokingappend()
.
-
-
Constructor Details
-
AbstractSelectExpressionStateObjectBuilder
Creates a newAbstractSelectExpressionStateObjectBuilder
.- Parameters:
parent
- The select clause for which this builder can create a select expression
-
-
Method Details
-
append
Description copied from interface:ISelectExpressionStateObjectBuilder
Appends the previously created select item and starts a new stack to create a new select item.- Specified by:
append
in interfaceISelectExpressionStateObjectBuilder
- Returns:
- This builder
-
commit
public void commit()Description copied from interface:ISelectExpressionStateObjectBuilder
Pushes the changes created by this builder to the state object.- Specified by:
commit
in interfaceISelectExpressionStateObjectBuilder
-
getParent
Description copied from class:AbstractScalarExpressionStateObjectBuilder
Returns the parent of the expression to build, which is only required when a JPQL fragment needs to be parsed.- Overrides:
getParent
in classAbstractScalarExpressionStateObjectBuilder<ISelectExpressionStateObjectBuilder>
- Returns:
- The parent
-
new_
public ISelectExpressionStateObjectBuilder new_(String className, ISelectExpressionStateObjectBuilder... parameters) Description copied from interface:ISelectExpressionStateObjectBuilder
Creates the expressionNEW constructor_name(identification_variable)
.- Specified by:
new_
in interfaceISelectExpressionStateObjectBuilder
- Parameters:
className
- The fully qualified class nameparameters
- The parameters of the constructor- Returns:
- This builder
-
object
Description copied from interface:ISelectExpressionStateObjectBuilder
Creates the expressionOBJECT(identification_variable)
.- Specified by:
object
in interfaceISelectExpressionStateObjectBuilder
- Parameters:
identificationVariable
- The identification variable- Returns:
- This builder
-
resultVariable
Description copied from interface:ISelectExpressionStateObjectBuilder
Defines the current state object with the given result variable.- Specified by:
resultVariable
in interfaceISelectExpressionStateObjectBuilder
- Parameters:
resultVariable
- The variable identifying the current select expression- Returns:
- This builder
-
resultVariable
-
resultVariableAs
Description copied from interface:ISelectExpressionStateObjectBuilder
Defines the current state object with the given result variable.- Specified by:
resultVariableAs
in interfaceISelectExpressionStateObjectBuilder
- Parameters:
resultVariable
- The variable identifying the current select expression- Returns:
- This builder
-
variable
Description copied from interface:ISelectExpressionStateObjectBuilder
Creates the expression representing an identification variable.- Specified by:
variable
in interfaceISelectExpressionStateObjectBuilder
- Parameters:
variable
- The identification variable- Returns:
- This
builder
-