java.lang.Object
org.eclipse.persistence.jpa.jpql.tools.model.BaseJPQLQueryFormatter
All Implemented Interfaces:
IJPQLQueryFormatter, StateObjectVisitor
Direct Known Subclasses:
AbstractActualJPQLQueryFormatter, AbstractJPQLQueryFormatter

public abstract class BaseJPQLQueryFormatter extends Object implements StateObjectVisitor, IJPQLQueryFormatter
An abstract implementation of a IJPQLQueryFormatter.
Since:
2.4
Version:
2.4
  • Field Details

  • Constructor Details

  • Method Details

    • formatIdentifier

      protected String formatIdentifier(String identifier)
      Formats the given JPQL identifier, if it needs to be decorated with more information. Which depends on how the string is created.
      Parameters:
      identifier - JPQL identifier to format
      Returns:
      By default the given identifier is returned
    • getIdentifierStyle

      public IJPQLQueryFormatter.IdentifierStyle getIdentifierStyle()
      Returns the style to use when formatting the JPQL identifiers.
      Returns:
      One of the possible ways to format the JPQL identifiers
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toString

      public String toString(StateObject stateObject)
      Description copied from interface: IJPQLQueryFormatter
      Creates a string representation of the given StateObject.
      Specified by:
      toString in interface IJPQLQueryFormatter
      Parameters:
      stateObject - The StateObject that represents a complete or incomplete JPQL query
      Returns:
      The string representation of the given StateObject
    • toText

      protected void toText(StateObject stateObject)
      Visits the given StateObject and prevents its decorator to be called, which will prevent any possible recursion when the decorator is outputting the information.
      Parameters:
      stateObject - The decorated StateObject to traverse without going through the decorator