KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > dao > DataAccessException


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.dao;
18
19 import org.springframework.core.NestedRuntimeException;
20
21 /**
22  * Root of the hierarchy of data access exceptions discussed in
23  * <a HREF="http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/">Expert One-On-One J2EE Design and Development</a>.
24  * Please see Chapter 9 of this book for detailed discussion of the
25  * motivation for this package.
26  *
27  * <p>This exception hierarchy aims to let user code find and handle the
28  * kind of error encountered without knowing the details of the particular
29  * data access API in use (e.g. JDBC). Thus it is possible to react to an
30  * optimistic locking failure without knowing that JDBC is being used.
31  *
32  * <p>As this class is a runtime exception, there is no need for user code
33  * to catch it or subclasses if any error is to be considered fatal
34  * (the usual case).
35  *
36  * @author Rod Johnson
37  */

38 public abstract class DataAccessException extends NestedRuntimeException {
39
40     /**
41      * Constructor for DataAccessException.
42      * @param msg the detail message
43      */

44     public DataAccessException(String JavaDoc msg) {
45         super(msg);
46     }
47
48     /**
49      * Constructor for DataAccessException.
50      * @param msg the detail message
51      * @param cause the root cause (usually from using a underlying
52      * data access API such as JDBC)
53      */

54     public DataAccessException(String JavaDoc msg, Throwable JavaDoc cause) {
55         super(msg, cause);
56     }
57
58 }
59
Popular Tags