javax.persistence
Class QueryTimeoutException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.persistence.PersistenceException
                  extended by javax.persistence.QueryTimeoutException
All Implemented Interfaces:
Serializable

public class QueryTimeoutException
extends PersistenceException

Thrown by the persistence provider when a query times out and only the statement is rolled back. The current transaction, if one is active, will be not be marked for rollback.

Since:
JPA 2.0 version.
Author:
Florent Benoit
See Also:
JPA 2.0 specification, Serialized Form

Constructor Summary
QueryTimeoutException()
          Default constructor : builds an exception with an empty message.
QueryTimeoutException(Query query)
          Build an exception with the given entity object.
QueryTimeoutException(String message)
          Build an exception with the given message.
QueryTimeoutException(String message, Throwable causedByThrowable)
          Builds an exception with a given message and given exception.
QueryTimeoutException(String message, Throwable causedByThrowable, Query query)
          Builds an exception with a given message and given exception.
QueryTimeoutException(Throwable causedByThrowable)
          Build an exception with the given exception.
 
Method Summary
 Query getQuery()
          Returns the query that caused this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryTimeoutException

public QueryTimeoutException()
Default constructor : builds an exception with an empty message.


QueryTimeoutException

public QueryTimeoutException(String message)
Build an exception with the given message.

Parameters:
message - the given message to use.

QueryTimeoutException

public QueryTimeoutException(Query query)
Build an exception with the given entity object.

Parameters:
entity - the given entity to use.

QueryTimeoutException

public QueryTimeoutException(Throwable causedByThrowable)
Build an exception with the given exception.

Parameters:
causedByThrowable - the cause of this exception.

QueryTimeoutException

public QueryTimeoutException(String message,
                             Throwable causedByThrowable)
Builds an exception with a given message and given exception.

Parameters:
message - the message of this exception.
causedByThrowable - the cause of this exception.

QueryTimeoutException

public QueryTimeoutException(String message,
                             Throwable causedByThrowable,
                             Query query)
Builds an exception with a given message and given exception.

Parameters:
message - the message of this exception.
causedByThrowable - the cause of this exception.
Method Detail

getQuery

public Query getQuery()
Returns the query that caused this exception.

Returns:
the query.


Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.