com.interface21.dao
Class DataAccessException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.interface21.core.NestedRuntimeException
                          |
                          +--com.interface21.dao.DataAccessException
All Implemented Interfaces:
HasRootCause, java.io.Serializable
Direct Known Subclasses:
CleanupFailureDataAccessException, DataAccessResourceFailureException, DataIntegrityViolationException, DeadlockLoserDataAccessException, InvalidDataAccessApiUsageException, InvalidDataAccessResourceUsageException, InvalidMaxValueIncrementerApiUsageException, OptimisticLockingFailureException, TypeMismatchDataAccessException, UncategorizedDataAccessException

public abstract class DataAccessException
extends NestedRuntimeException

Root of the hierarchy of data access exceptions discussed in Expert One-On-One J2EE Design and Development. Please see Chapter 9 of this book for detailed discussion of the motivation for this package. This exception hierarchy aims to let user code find and handle the kind of error encountered without knowing the details of the particular data access API in use (e.g. JDBC). Thus it is possible to react to an optimistic locking failure without knowing that JDBC is being used.
As this class is a runtime exception, there is no need for user code to catch it or subclasses if any error is to be considered fatal (the usual case).

Author:
Rod Johnson
See Also:
Serialized Form

Constructor Summary
DataAccessException(java.lang.String s)
          Constructor for DataAccessException.
DataAccessException(java.lang.String s, java.lang.Throwable ex)
          Constructor for DataAccessException.
 
Methods inherited from class com.interface21.core.NestedRuntimeException
getMessage, getRootCause, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataAccessException

public DataAccessException(java.lang.String s)
Constructor for DataAccessException.
Parameters:
s - message

DataAccessException

public DataAccessException(java.lang.String s,
                           java.lang.Throwable ex)
Constructor for DataAccessException.
Parameters:
s - message
ex - root cause (usually from using a underlying data access API such as JDBC)


Rod Johnson and Spring contributors 2001-2003.