protected abstract static class AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression> extends java.lang.Object implements AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T>
AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper
which
implements some of the methods since the behavior is the same for all subclasses of
AbstractSingleEncapsulatedExpression
.Modifier | Constructor and Description |
---|---|
protected |
AbstractSingleEncapsulatedExpressionHelper(AbstractGrammarValidator validator) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
arguments(T expression)
Returns the arguments that can help to format the localized problem.
|
protected abstract java.lang.String |
encapsulatedExpressionInvalidKey(T expression)
Returns the message key for the problem describing that the encapsulated expression is invalid.
|
protected int |
encapsulatedExpressionLength(T expression)
Returns the length of the encapsulated expression.
|
protected abstract java.lang.String |
encapsulatedExpressionMissingKey(T expression)
Returns the message key for the problem describing that the encapsulated expression is missing.
|
boolean |
hasLeftParenthesis(T expression)
Determines whether the given
AbstractEncapsulatedExpression has the left parenthesis. |
boolean |
hasRightParenthesis(T expression)
Determines whether the given
AbstractEncapsulatedExpression has the right parenthesis. |
java.lang.String |
identifier(T expression)
Returns the JPQL identifier of the given
AbstractEncapsulatedExpression . |
protected boolean |
isEncapsulatedExpressionMissing(T expression)
Determines whether there is an encapsulated expression or not.
|
protected boolean |
isEncapsulatedExpressionValid(T expression)
Determines whether the encapsulated expression is valid.
|
protected int |
lengthBeforeEncapsulatedExpression(T expression)
Returns the length after the left parenthesis and before the encapsulated expression starts.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
leftParenthesisMissingKey, rightParenthesisMissingKey
protected AbstractSingleEncapsulatedExpressionHelper(AbstractGrammarValidator validator)
public java.lang.String[] arguments(T expression)
arguments
in interface AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>
expression
- The AbstractEncapsulatedExpression
being validatedprotected abstract java.lang.String encapsulatedExpressionInvalidKey(T expression)
expression
- The AbstractSingleEncapsulatedExpression
being validatedprotected int encapsulatedExpressionLength(T expression)
expression
- AbstractSingleEncapsulatedExpression
being validatedprotected abstract java.lang.String encapsulatedExpressionMissingKey(T expression)
expression
- The AbstractSingleEncapsulatedExpression
being validatedpublic boolean hasLeftParenthesis(T expression)
AbstractEncapsulatedExpression
has the left parenthesis.hasLeftParenthesis
in interface AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>
expression
- The AbstractEncapsulatedExpression
being validatedtrue
if the left parenthesis was parsedpublic boolean hasRightParenthesis(T expression)
AbstractEncapsulatedExpression
has the right parenthesis.hasRightParenthesis
in interface AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>
expression
- The AbstractEncapsulatedExpression
being validatedtrue
if the right parenthesis was parsedpublic final java.lang.String identifier(T expression)
AbstractEncapsulatedExpression
.identifier
in interface AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>
expression
- The AbstractEncapsulatedExpression
being validatedAbstractEncapsulatedExpression
protected boolean isEncapsulatedExpressionMissing(T expression)
expression
- The AbstractSingleEncapsulatedExpression
being validatedtrue
if the given AbstractSingleEncapsulatedExpression
has an
encapsulated expression; false
otherwiseprotected boolean isEncapsulatedExpressionValid(T expression)
expression
- The AbstractSingleEncapsulatedExpression
being validatedtrue
if the encapsulated expression is valid; false
otherwiseprotected int lengthBeforeEncapsulatedExpression(T expression)
By default, there is no text after the left parenthesis and the encapsulated expression but there are exceptions, such as the functions (AVG, COUNT, MIN, MAX, SUM).
expression
- The AbstractSingleEncapsulatedExpression
being validated