public class QuerySyntaxException extends QueryException
| Modifier | Constructor and Description |
|---|---|
|
QuerySyntaxException(java.lang.String message)
Constructs a QuerySyntaxException
|
|
QuerySyntaxException(java.lang.String message,
java.lang.String hql)
Constructs a QuerySyntaxException
|
protected |
QuerySyntaxException(java.lang.String message,
java.lang.String queryString,
java.lang.Exception cause)
Intended for use solely from
generateQueryException(String) |
| Modifier and Type | Method and Description |
|---|---|
static QuerySyntaxException |
convert(antlr.RecognitionException e)
Converts the given ANTLR RecognitionException into a QuerySyntaxException.
|
static QuerySyntaxException |
convert(antlr.RecognitionException e,
java.lang.String hql)
Converts the given ANTLR RecognitionException into a QuerySyntaxException.
|
protected QueryException |
generateQueryException(java.lang.String queryString)
Called from
QueryException.wrapWithQueryString(String) when we really need to generate a new QueryException
(or subclass). |
getMessage, getOriginalMessage, getQueryString, wrapWithQueryStringpublic QuerySyntaxException(java.lang.String message)
message - Message explaining the condition that led to the exceptionpublic QuerySyntaxException(java.lang.String message,
java.lang.String hql)
message - Message explaining the condition that led to the exceptionhql - The hql query that was being parsed/analyzedprotected QuerySyntaxException(java.lang.String message,
java.lang.String queryString,
java.lang.Exception cause)
generateQueryException(String)message - Message explaining the condition that led to the exceptionqueryString - The hql query that was being parsed/analyzedcause - The cause, generally another QuerySyntaxExceptionpublic static QuerySyntaxException convert(antlr.RecognitionException e)
e - The ANTLR exceptionpublic static QuerySyntaxException convert(antlr.RecognitionException e, java.lang.String hql)
e - The ANTLR exceptionhql - The query stringprotected QueryException generateQueryException(java.lang.String queryString)
QueryExceptionQueryException.wrapWithQueryString(String) when we really need to generate a new QueryException
(or subclass).
NOTE : implementors should take care to use QueryException.getOriginalMessage() for the message, not
QueryException.getMessage()generateQueryException in class QueryExceptionqueryString - The query stringQueryException.getOriginalMessage()Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.