Class AbstractStateObjectBuilder
java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.AbstractStateObjectBuilder
- Direct Known Subclasses:
AbstractScalarExpressionStateObjectBuilder
The abstract definition of a builder of a
StateObject hierarchy based on a JPQL fragment
that is manually created.- Since:
- 2.4
- Version:
- 2.4
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newAbstractStateObjectBuilder. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadd(StateObject stateObject) Adds the givenStateObjectto the stack for future use, which will be removed from the stack to complete the creation of anotherStateObject.protected final voidcheckBuilder(IScalarExpressionStateObjectBuilder<?> builder) Makes sure the givenbuilderis this one.protected final <T extends IScalarExpressionStateObjectBuilder<?>>
voidcheckBuilders(T... builders) Makes sure the givenbuilderis this one.protected booleanDetermines whether the stack ofStateObjectsis not empty.protected final StateObjectpop()Retrieves theStateObjectthat is on the stack.
-
Constructor Details
-
AbstractStateObjectBuilder
protected AbstractStateObjectBuilder()Creates a newAbstractStateObjectBuilder.
-
-
Method Details
-
add
Adds the givenStateObjectto the stack for future use, which will be removed from the stack to complete the creation of anotherStateObject.- Parameters:
stateObject- The newly createdStateObject
-
checkBuilder
Makes sure the givenbuilderis this one.- Parameters:
builder- The builder that was passed as an argument, which is only meant to create the stack ofStateObjectsin the right order
-
checkBuilders
@SafeVarargs protected final <T extends IScalarExpressionStateObjectBuilder<?>> void checkBuilders(T... builders) Makes sure the givenbuilderis this one.- Parameters:
builders- The builders that were passed as arguments, which is only meant to create the stack ofStateObjectsin the right order
-
hasStateObjects
protected boolean hasStateObjects()Determines whether the stack ofStateObjectsis not empty.- Returns:
trueif the stack is not empty;falseotherwise
-
pop
Retrieves theStateObjectthat is on the stack.- Returns:
- The last
StateObjectthat was added on the stack
-