org.hibernate

Class QueryException

Implemented Interfaces:
Nestable
Known Direct Subclasses:
QueryExecutionRequestException, QueryParameterException, QuerySyntaxException

public class QueryException
extends HibernateException

A problem occurred translating a Hibernate query to SQL due to invalid query syntax, etc.

Field Summary

Fields inherited from class org.hibernate.exception.NestableRuntimeException

delegate

Constructor Summary

QueryException(Exception e)
QueryException(String message)
Constructs a new NestableRuntimeException with specified detail message.
QueryException(String message, String queryString)
QueryException(String message, Throwable e)
Constructs a new NestableRuntimeException with specified detail message and nested Throwable.

Method Summary

String
getMessage()
Returns the detail message string of this throwable.
String
getQueryString()
void
setQueryString(String queryString)

Methods inherited from class org.hibernate.exception.NestableRuntimeException

getCause, getMessage, getMessage, getMessages, getThrowable, getThrowableCount, getThrowables, indexOfThrowable, indexOfThrowable, printPartialStackTrace, printStackTrace, printStackTrace, printStackTrace

Constructor Details

QueryException

public QueryException(Exception e)

QueryException

public QueryException(String message)
Constructs a new NestableRuntimeException with specified detail message.
Parameters:

QueryException

public QueryException(String message,
                      String queryString)

QueryException

public QueryException(String message,
                      Throwable e)
Constructs a new NestableRuntimeException with specified detail message and nested Throwable.
Parameters:

Method Details

getMessage

public String getMessage()
Returns the detail message string of this throwable. If it was created with a null message, returns the following: ( cause==null ? null : cause.toString( ).
Specified by:
getMessage in interface Nestable
Overrides:
getMessage in interface NestableRuntimeException

getQueryString

public String getQueryString()

setQueryString

public void setQueryString(String queryString)