类 QuerySyntaxException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- javax.persistence.PersistenceException
-
- org.hibernate.HibernateException
-
- org.hibernate.QueryException
-
- org.hibernate.hql.internal.ast.QuerySyntaxException
-
- 所有已实现的接口:
Serializable
- 直接已知子类:
InvalidWithClauseException
public class QuerySyntaxException extends QueryException
Exception thrown when there is a syntax error in the HQL.- 作者:
- josh
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 限定符 构造器 说明 QuerySyntaxException(String message)Constructs a QuerySyntaxExceptionQuerySyntaxException(String message, String hql)Constructs a QuerySyntaxExceptionprotectedQuerySyntaxException(String message, String queryString, Exception cause)Intended for use solely fromgenerateQueryException(String)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static QuerySyntaxExceptionconvert(antlr.RecognitionException e)Converts the given ANTLR RecognitionException into a QuerySyntaxException.static QuerySyntaxExceptionconvert(antlr.RecognitionException e, String hql)Converts the given ANTLR RecognitionException into a QuerySyntaxException.protected QueryExceptiongenerateQueryException(String queryString)Called fromQueryException.wrapWithQueryString(String)when we really need to generate a new QueryException (or subclass).-
从类继承的方法 org.hibernate.QueryException
getMessage, getOriginalMessage, getQueryString, wrapWithQueryString
-
-
-
-
构造器详细资料
-
QuerySyntaxException
public QuerySyntaxException(String message)
Constructs a QuerySyntaxException- 参数:
message- Message explaining the condition that led to the exception
-
QuerySyntaxException
public QuerySyntaxException(String message, String hql)
Constructs a QuerySyntaxException- 参数:
message- Message explaining the condition that led to the exceptionhql- The hql query that was being parsed/analyzed
-
QuerySyntaxException
protected QuerySyntaxException(String message, String queryString, Exception cause)
Intended for use solely fromgenerateQueryException(String)- 参数:
message- Message explaining the condition that led to the exceptionqueryString- The hql query that was being parsed/analyzedcause- The cause, generally another QuerySyntaxException
-
-
方法详细资料
-
convert
public static QuerySyntaxException convert(antlr.RecognitionException e)
Converts the given ANTLR RecognitionException into a QuerySyntaxException. The RecognitionException does not become the cause because ANTLR exceptions are not serializable.- 参数:
e- The ANTLR exception- 返回:
- The QuerySyntaxException
-
convert
public static QuerySyntaxException convert(antlr.RecognitionException e, String hql)
Converts the given ANTLR RecognitionException into a QuerySyntaxException. The RecognitionException does not become the cause because ANTLR exceptions are not serializable.- 参数:
e- The ANTLR exceptionhql- The query string- 返回:
- The QuerySyntaxException
-
generateQueryException
protected QueryException generateQueryException(String queryString)
从类复制的说明:QueryExceptionCalled fromQueryException.wrapWithQueryString(String)when we really need to generate a new QueryException (or subclass). NOTE : implementors should take care to useQueryException.getOriginalMessage()for the message, notQueryException.getMessage()- 覆盖:
generateQueryException在类中QueryException- 参数:
queryString- The query string- 返回:
- The generated QueryException (or subclass)
- 另请参阅:
QueryException.getOriginalMessage()
-
-