
org.hibernate.QueryException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate Show documentation
Show all versions of hibernate Show documentation
Relational Persistence for Java
//$Id: QueryException.java 3890 2004-06-03 16:31:32Z steveebersole $
package org.hibernate;
/**
* A problem occurred translating a Hibernate query to SQL
* due to invalid query syntax, etc.
*/
public class QueryException extends HibernateException {
private String queryString;
public QueryException(String message) {
super(message);
}
public QueryException(String message, Throwable e) {
super(message, e);
}
public QueryException(String message, String queryString) {
super(message);
this.queryString = queryString;
}
public QueryException(Exception e) {
super(e);
}
public String getQueryString() {
return queryString;
}
public void setQueryString(String queryString) {
this.queryString = queryString;
}
public String getMessage() {
String msg = super.getMessage();
if ( queryString!=null ) msg += " [" + queryString + ']';
return msg;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy