EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql
Class AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>

java.lang.Object
  extended by org.eclipse.persistence.jpa.jpql.AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<T>
All Implemented Interfaces:
AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T>
Enclosing class:
AbstractGrammarValidator

protected abstract class AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>
extends java.lang.Object
implements AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T>

The abstract implementation of AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper which implements some of the methods since the behavior is the same for all subclasses of AbstractSingleEncapsulatedExpression.


Constructor Summary
protected AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.persistence.jpa.jpql.AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper
leftParenthesisMissingKey, rightParenthesisMissingKey
 

Constructor Detail

AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper

protected AbstractGrammarValidator.AbstractSingleEncapsulatedExpressionHelper()
Method Detail

arguments

public java.lang.String[] arguments(T expression)
Returns the arguments that can help to format the localized problem.

Specified by:
arguments in interface AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>
Parameters:
expression - The AbstractEncapsulatedExpression being validated
Returns:
The list of arguments used to complete the localized problem

encapsulatedExpressionInvalidKey

protected abstract java.lang.String encapsulatedExpressionInvalidKey(T expression)
Returns the message key for the problem describing that the encapsulated expression is invalid.

Parameters:
expression - The AbstractSingleEncapsulatedExpression being validated
Returns:
The key used to retrieve the localized message

encapsulatedExpressionLength

protected int encapsulatedExpressionLength(T expression)
Returns the length of the encapsulated expression.

Parameters:
expression - AbstractSingleEncapsulatedExpression being validated
Returns:
The length of the encapsulated expression

encapsulatedExpressionMissingKey

protected abstract java.lang.String encapsulatedExpressionMissingKey(T expression)
Returns the message key for the problem describing that the encapsulated expression is missing.

Parameters:
expression - The AbstractSingleEncapsulatedExpression being validated
Returns:
The key used to retrieve the localized message

hasLeftParenthesis

public boolean hasLeftParenthesis(T expression)
Determines whether the given AbstractEncapsulatedExpression has the left parenthesis.

Specified by:
hasLeftParenthesis in interface AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>
Parameters:
expression - The AbstractEncapsulatedExpression being validated
Returns:
true if the left parenthesis was parsed

hasRightParenthesis

public boolean hasRightParenthesis(T expression)
Determines whether the given AbstractEncapsulatedExpression has the right parenthesis.

Specified by:
hasRightParenthesis in interface AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>
Parameters:
expression - The AbstractEncapsulatedExpression being validated
Returns:
true if the right parenthesis was parsed

identifier

public final java.lang.String identifier(T expression)
Returns the JPQL identifier of the given AbstractEncapsulatedExpression.

Specified by:
identifier in interface AbstractGrammarValidator.AbstractEncapsulatedExpressionHelper<T extends AbstractSingleEncapsulatedExpression>
Parameters:
expression - The AbstractEncapsulatedExpression being validated
Returns:
The JPQL identifier of the given AbstractEncapsulatedExpression

isEncapsulatedExpressionMissing

protected boolean isEncapsulatedExpressionMissing(T expression)
Determines whether there is an encapsulated expression or not.

Parameters:
expression - The AbstractSingleEncapsulatedExpression being validated
Returns:
true if the given AbstractSingleEncapsulatedExpression has an encapsulated expression; false otherwise

isEncapsulatedExpressionValid

protected boolean isEncapsulatedExpressionValid(T expression)
Determines whether the encapsulated expression is valid.

Parameters:
expression - The AbstractSingleEncapsulatedExpression being validated
Returns:
true if the encapsulated expression is valid; false otherwise

lengthBeforeEncapsulatedExpression

protected int lengthBeforeEncapsulatedExpression(T expression)
Returns the length after the left parenthesis and before the encapsulated expression starts.

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).

Parameters:
expression - The AbstractSingleEncapsulatedExpression being validated
Returns:
The length after the left parenthesis and before the encapsulated expression starts

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference