Class AbstractStateObjectBuilder
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.model.AbstractStateObjectBuilder
-
- Direct Known Subclasses:
AbstractScalarExpressionStateObjectBuilder
public abstract class AbstractStateObjectBuilder extends java.lang.Object
The abstract definition of a builder of aStateObject
hierarchy based on a JPQL fragment that is manually created.- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractStateObjectBuilder()
Creates a newAbstractStateObjectBuilder
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
add(StateObject stateObject)
Adds the givenStateObject
to the stack for future use, which will be removed from the stack to complete the creation of anotherStateObject
.protected void
checkBuilder(IScalarExpressionStateObjectBuilder<?> builder)
Makes sure the givenbuilder
is this one.protected <T extends IScalarExpressionStateObjectBuilder<?>>
voidcheckBuilders(T... builders)
Makes sure the givenbuilder
is this one.protected boolean
hasStateObjects()
Determines whether the stack ofStateObjects
is not empty.protected StateObject
pop()
Retrieves theStateObject
that is on the stack.
-
-
-
Method Detail
-
add
protected void add(StateObject stateObject)
Adds the givenStateObject
to 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 givenbuilder
is this one.- Parameters:
builder
- The builder that was passed as an argument, which is only meant to create the stack ofStateObjects
in the right order
-
checkBuilders
protected final <T extends IScalarExpressionStateObjectBuilder<?>> void checkBuilders(T... builders)
Makes sure the givenbuilder
is this one.- Parameters:
builders
- The builders that were passed as arguments, which is only meant to create the stack ofStateObjects
in the right order
-
hasStateObjects
protected boolean hasStateObjects()
Determines whether the stack ofStateObjects
is not empty.- Returns:
true
if the stack is not empty;false
otherwise
-
pop
protected final StateObject pop()
Retrieves theStateObject
that is on the stack.- Returns:
- The last
StateObject
that was added on the stack
-
-