类 DataAccessException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.dao.DataAccessException
- 所有已实现的接口:
Serializable
- 直接已知子类:
NonTransientDataAccessException
,RecoverableDataAccessException
,ScriptException
,TransientDataAccessException
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).
- 作者:
- Rod Johnson
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 DataAccessException(String msg)
Constructor for DataAccessException.DataAccessException(String msg, Throwable cause)
Constructor for DataAccessException.
方法概要
从类继承的方法 org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
构造器详细资料
DataAccessException
public DataAccessException(String msg)
Constructor for DataAccessException.- 参数:
msg
- the detail message
DataAccessException
public DataAccessException(String msg, Throwable cause)
Constructor for DataAccessException.- 参数:
msg
- the detail messagecause
- the root cause (usually from using a underlying data access API such as JDBC)