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

public abstract Class AbstractStateObjectBuilder

extends Object
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.jpa.jpql.tools.model.AbstractScalarExpressionStateObjectBuilder
Annotations
@SuppressWarnings:nls
Imports
java.util.Stack, org.eclipse.persistence.jpa.jpql.Assert, org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject

The abstract definition of a builder of a StateObject hierarchy based on a JPQL fragment that is manually created.
Author
Pascal Filion
Since
2.4
Version
2.4

Field Summary

Modifier and TypeField and Description
private final Stack<StateObject>
stateObjects

The stack is used to store the StateObjects that were created, which will be used to properly create the expression.

Constructor Summary

AccessConstructor and Description
protected
AbstractStateObjectBuilder()

Creates a new AbstractStateObjectBuilder.

Method Summary

Modifier and TypeMethod and Description
protected void
add(StateObject
The newly created StateObject
stateObject
)

Adds the given StateObject to the stack for future use, which will be removed from the stack to complete the creation of another StateObject.

protected final void
checkBuilder(IScalarExpressionStateObjectBuilder<?>
The builder that was passed as an argument, which is only meant to create the stack of StateObjects in the right order
builder
)

Makes sure the given builder is this one.

protected final <T extends IScalarExpressionStateObjectBuilder<?>> void
checkBuilders(T...
The builders that were passed as arguments, which is only meant to create the stack of StateObjects in the right order
builders
)

Makes sure the given builder is this one.

protected boolean

Returns:

true if the stack is not empty; false otherwise
hasStateObjects
()

Determines whether the stack of StateObjects is not empty.

protected final StateObject

Returns:

The last StateObject that was added on the stack
pop
()

Retrieves the StateObject that is on the stack.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

stateObjectsback to summary
private final Stack<StateObject> stateObjects

The stack is used to store the StateObjects that were created, which will be used to properly create the expression.

Constructor Detail

AbstractStateObjectBuilderback to summary
protected AbstractStateObjectBuilder()

Creates a new AbstractStateObjectBuilder.

Method Detail

addback to summary
protected void add(StateObject stateObject)

Adds the given StateObject to the stack for future use, which will be removed from the stack to complete the creation of another StateObject.

Parameters
stateObject:StateObject

The newly created StateObject

checkBuilderback to summary
protected final void checkBuilder(IScalarExpressionStateObjectBuilder<?> builder)

Makes sure the given builder is this one.

Parameters
builder:IScalarExpressionStateObjectBuilder<?>

The builder that was passed as an argument, which is only meant to create the stack of StateObjects in the right order

checkBuildersback to summary
protected final <T extends IScalarExpressionStateObjectBuilder<?>> void checkBuilders(T... builders)

Makes sure the given builder is this one.

Parameters
builders:T[]

The builders that were passed as arguments, which is only meant to create the stack of StateObjects in the right order

Annotations
@SafeVarargs
hasStateObjectsback to summary
protected boolean hasStateObjects()

Determines whether the stack of StateObjects is not empty.

Returns:boolean

true if the stack is not empty; false otherwise

popback to summary
protected final StateObject pop()

Retrieves the StateObject that is on the stack.

Returns:StateObject

The last StateObject that was added on the stack