public abstract class BaseJPQLQueryFormatter extends java.lang.Object implements StateObjectVisitor, IJPQLQueryFormatter
IJPQLQueryFormatter
.IJPQLQueryFormatter.IdentifierStyle
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
COMMA
The constant for a comma: ','.
|
protected static java.lang.String |
COMMA_SPACE
The constant for a comma followed by a space: ', '.
|
protected static java.lang.String |
LEFT_PARENTHESIS
The constant for the left parenthesis: '('.
|
protected static java.lang.String |
RIGHT_PARENTHESIS
The constant for the right parenthesis: ')'.
|
protected static java.lang.String |
SPACE
The constant for a space: ' '.
|
protected IJPQLQueryFormatter.IdentifierStyle |
style
Determines how the JPQL identifiers are written out.
|
protected java.lang.StringBuilder |
writer
The holder of the string representation of the JPQL query.
|
Modifier | Constructor and Description |
---|---|
protected |
BaseJPQLQueryFormatter(IJPQLQueryFormatter.IdentifierStyle style)
Creates a new
BaseJPQLQueryFormatter . |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
formatIdentifier(java.lang.String identifier)
Formats the given JPQL identifier, if it needs to be decorated with more information.
|
IJPQLQueryFormatter.IdentifierStyle |
getIdentifierStyle()
Returns the style to use when formatting the JPQL identifiers.
|
java.lang.String |
toString() |
java.lang.String |
toString(StateObject stateObject)
Creates a string representation of the given
StateObject . |
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
protected final IJPQLQueryFormatter.IdentifierStyle style
protected final java.lang.StringBuilder writer
protected static final java.lang.String COMMA
protected static final java.lang.String COMMA_SPACE
protected static final java.lang.String LEFT_PARENTHESIS
protected static final java.lang.String RIGHT_PARENTHESIS
protected static final java.lang.String SPACE
protected BaseJPQLQueryFormatter(IJPQLQueryFormatter.IdentifierStyle style)
BaseJPQLQueryFormatter
.style
- Determines how the JPQL identifiers are written out, which is used if the
StateObject
was modified after its creationjava.lang.NullPointerException
- The IdentifierStyle
cannot be null
protected java.lang.String formatIdentifier(java.lang.String identifier)
identifier
- JPQL identifier to formatpublic IJPQLQueryFormatter.IdentifierStyle getIdentifierStyle()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(StateObject stateObject)
StateObject
.toString
in interface IJPQLQueryFormatter
stateObject
- The StateObject
that represents a complete or incomplete JPQL queryStateObject
protected void toText(StateObject stateObject)
StateObject
and prevents its decorator to be called, which will
prevent any possible recursion when the decorator is outputting the information.stateObject
- The decorated StateObject
to traverse without going through the
decorator