Class AbstractStateObjectBuilder
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.model.AbstractStateObjectBuilder
-
- Direct Known Subclasses:
AbstractScalarExpressionStateObjectBuilder
public abstract class AbstractStateObjectBuilder extends java.lang.ObjectThe abstract definition of a builder of aStateObjecthierarchy based on a JPQL fragment that is manually created.- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractStateObjectBuilder()Creates a newAbstractStateObjectBuilder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 voidcheckBuilder(IScalarExpressionStateObjectBuilder<?> builder)Makes sure the givenbuilderis this one.protected <T extends IScalarExpressionStateObjectBuilder<?>>
voidcheckBuilders(T... builders)Makes sure the givenbuilderis this one.protected booleanhasStateObjects()Determines whether the stack ofStateObjectsis not empty.protected StateObjectpop()Retrieves theStateObjectthat is on the stack.
-
-
-
Method Detail
-
add
protected void add(StateObject stateObject)
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
protected final void checkBuilder(IScalarExpressionStateObjectBuilder<?> builder)
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
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
protected final StateObject pop()
Retrieves theStateObjectthat is on the stack.- Returns:
- The last
StateObjectthat was added on the stack
-
-