Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.jpa.internal.jpql
Class DefaultJPQLQueryProblem

java.lang.Object
  extended by org.eclipse.persistence.jpa.internal.jpql.DefaultJPQLQueryProblem

All Implemented Interfaces:
JPQLQueryProblem

final class DefaultJPQLQueryProblem
extends java.lang.Object
implements JPQLQueryProblem

The default implementation of a JPQLQueryProblem.

Since:
2.3
Version:
2.3
Author:
Pascal Filion

Field Summary
private  int endIndex
          The position where the problem ends, inclusively.
private  Expression expression
          The Expression that is either not following the BNF grammar or that has semantic problems.
private  java.lang.String[] messageArguments
          The list of arguments that can be used to format the localized description of the problem.
private  java.lang.String messageKey
          The key used to retrieve the localized message describing the problem.
private  IQuery query
          The external form of the query to validate.
private  int startIndex
          The position where the problem ends.

 

Constructor Summary
DefaultJPQLQueryProblem(IQuery query, Expression expression, int startIndex, int endIndex, java.lang.String messageKey, java.lang.String... messageArguments)
          Creates a new DefaultJPQLQueryProblem.

 

Method Summary
 int getEndPosition()
          Returns the position from where the problem ends, inclusively.
 Expression getExpression()
          Returns the parsed tree representing the JPQL query.
 java.lang.String[] getMessageArguments()
          Returns the arguments associate with the problem's message.
 java.lang.String getMessageKey()
          Returns the resource bundle key used to retrieve the localized message.
 IQuery getQuery()
          Returns the named query for which this problem was created.
 int getStartPosition()
          Returns the position from where the problem starts.
 java.lang.String toString()
          

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

endIndex

private int endIndex
The position where the problem ends, inclusively.

expression

private Expression expression
The Expression that is either not following the BNF grammar or that has semantic problems.

messageArguments

private java.lang.String[] messageArguments
The list of arguments that can be used to format the localized description of the problem.

messageKey

private java.lang.String messageKey
The key used to retrieve the localized message describing the problem.

query

private IQuery query
The external form of the query to validate.

startIndex

private int startIndex
The position where the problem ends.

Constructor Detail

DefaultJPQLQueryProblem

DefaultJPQLQueryProblem(IQuery query,
                        Expression expression,
                        int startIndex,
                        int endIndex,
                        java.lang.String messageKey,
                        java.lang.String... messageArguments)
Creates a new DefaultJPQLQueryProblem.
Parameters:
query - The external form of the query to validate, cannot be null
expression - The Expression that is either not following the BNF grammar or that has semantic problems
startIndex - The position where the problem was encountered
endIndex - The position where the problem ends, inclusively
messageKey - The key used to retrieve the localized message describing the problem
messageArguments - The list of arguments that can be used to format the localized description of the problem

Method Detail

getEndPosition

public int getEndPosition()
Returns the position from where the problem ends, inclusively.
Specified by:
getEndPosition in interface JPQLQueryProblem
Returns:
The position of the last character that was found as problematic within the JPQL query, inclusively

getExpression

public Expression getExpression()
Returns the parsed tree representing the JPQL query.
Specified by:
getExpression in interface JPQLQueryProblem
Returns:
The parsed tree representing the JPQL query

getMessageArguments

public java.lang.String[] getMessageArguments()
Returns the arguments associate with the problem's message.
Specified by:
getMessageArguments in interface JPQLQueryProblem
Returns:
A non-null list of arguments that can be used to format the localized message

getMessageKey

public java.lang.String getMessageKey()
Returns the resource bundle key used to retrieve the localized message.
Specified by:
getMessageKey in interface JPQLQueryProblem
Returns:
The key used to retrieve the localized message

getQuery

public IQuery getQuery()
Returns the named query for which this problem was created.
Specified by:
getQuery in interface JPQLQueryProblem
Returns:
The named query that was validated

getStartPosition

public int getStartPosition()
Returns the position from where the problem starts.
Specified by:
getStartPosition in interface JPQLQueryProblem
Returns:
The position of the first character that was found as problematic within the JPQL query, inclusively

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.