The two most important subtypes are:
org.hibernate.query.SyntaxException , which represents a syntax
error in the HQL query, and
org.hibernate.query.SemanticException , which represents an error
in the semantics of the query.
org.hibernate.query.SemanticException , org.hibernate.query.SyntaxException
| Modifier and Type | Field and Description |
|---|---|
| private final String |
| Access | Constructor and Description |
|---|---|
| public | QueryException(String
A message explaining the exception condition message)
Deprecated
since 6.3. this constructor does not carry information
about the query which caused the failure
Constructs a QueryException using the specified exception message.
|
| public | QueryException(String
A message explaining the exception condition message, Exception The underlying cause cause)
Deprecated
since 6.3. this constructor does not carry information
about the query which caused the failure
Constructs a QueryException using the specified exception message and cause.
|
| public | QueryException(String
A message explaining the exception condition message, String The query being evaluated when the exception occurred queryString)Constructs a |
| public | QueryException(String
A message explaining the exception condition message, String The query being evaluated when the exception occurred queryString, Exception The underlying cause cause)Constructs a |
| public | QueryException(Exception
The underlying cause cause)
Deprecated
since 6.3. this constructor does not carry information
about the query which caused the failure
Constructs a QueryException using the specified cause.
|
| Modifier and Type | Method and Description |
|---|---|
| protected QueryException | Returns: The generatedQueryException (or subclass)The query string queryString)Called from |
| public String | getMessage()
Overrides java. |
| protected final String | |
| public String | Returns: The query stringRetrieve the query being evaluated when the exception occurred. |
| public final QueryException | Returns: this, if this has null for getQueryString();
otherwise a new QueryException (or subclass) is returned.The query string that led to the QueryException queryString)
Deprecated
for removal since 6.2. This method is no longer used
Wraps this exception with another, of same kind, with the specified query string.
|
| queryString | back to summary |
|---|---|
| private final String queryString | |
| QueryException | back to summary |
|---|---|
| public QueryException(String message)
Deprecated since 6.3. this constructor does not carry information about the query which caused the failure Constructs a
| |
| QueryException | back to summary |
|---|---|
| public QueryException(String message, Exception cause)
Deprecated since 6.3. this constructor does not carry information about the query which caused the failure Constructs a
| |
| QueryException | back to summary |
|---|---|
| public QueryException(String message, String queryString) Constructs a | |
| QueryException | back to summary |
|---|---|
| public QueryException(String message, String queryString, Exception cause) Constructs a | |
| QueryException | back to summary |
|---|---|
| public QueryException(Exception cause)
Deprecated since 6.3. this constructor does not carry information about the query which caused the failure Constructs a
| |
| generateQueryException | back to summary |
|---|---|
| protected QueryException generateQueryException(String queryString) Called from Implementation Note implementors should take care to use
| |
| getMessage | back to summary |
|---|---|
| public String getMessage() Overrides java. Doc from java. Returns the detail message string of this throwable. | |
| getOriginalMessage | back to summary |
|---|---|
| protected final String getOriginalMessage() | |
| getQueryString | back to summary |
|---|---|
| public String getQueryString() Retrieve the query being evaluated when the exception occurred. May be null, but generally should not be.
| |
| wrapWithQueryString | back to summary |
|---|---|
| public final QueryException wrapWithQueryString(String queryString)
Deprecated for removal since 6.2. This method is no longer used Wraps this exception with another, of same kind, with the specified query string.
If this exception already has a query string defined, the same exception (
| |