Class AbstractStateObjectBuilder

java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.AbstractStateObjectBuilder
Direct Known Subclasses:
AbstractScalarExpressionStateObjectBuilder

public abstract class AbstractStateObjectBuilder extends Object
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 Details

    • AbstractStateObjectBuilder

      protected AbstractStateObjectBuilder()
      Creates a new AbstractStateObjectBuilder.
  • Method Details

    • add

      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 - The newly created StateObject
    • checkBuilder

      protected final void checkBuilder(IScalarExpressionStateObjectBuilder<?> builder)
      Makes sure the given builder is this one.
      Parameters:
      builder - The builder that was passed as an argument, which is only meant to create the stack of StateObjects in the right order
    • checkBuilders

      @SafeVarargs protected final <T extends IScalarExpressionStateObjectBuilder<?>> void checkBuilders(T... builders)
      Makes sure the given builder is this one.
      Parameters:
      builders - The builders that were passed as arguments, which is only meant to create the stack of StateObjects in the right order
    • hasStateObjects

      protected boolean hasStateObjects()
      Determines whether the stack of StateObjects is not empty.
      Returns:
      true if the stack is not empty; false otherwise
    • pop

      protected final StateObject pop()
      Retrieves the StateObject that is on the stack.
      Returns:
      The last StateObject that was added on the stack