1 //----------------------------------------------------------------------
2 //
3 // PerfectJPattern: "Design patterns are good but components are better!"
4 // DaoException.java Copyright (c) 2009 Giovanni Azua Garcia
5 // bravegag@hotmail.com
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 3
10 // of the License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, see <http://www.gnu.org/licenses/>.
19 //
20 //----------------------------------------------------------------------
21 package org.perfectjpattern.jee.api.integration.dao;
22
23 /**
24 * Data Access Object (DAO) Exception
25 *
26 * @author <a href="mailto:bravegag@hotmail.com">Giovanni Azua</a>
27 * @version $Revision: 1.0 $ $Date: Nov 26, 2007 8:46:05 PM $
28 */
29 public
30 class DaoException
31 extends RuntimeException
32 {
33 //------------------------------------------------------------------------
34 // public
35 //------------------------------------------------------------------------
36 /**
37 * Constructs a new DaoException with <code>null</code> as its
38 * detail message.
39 */
40 public
41 DaoException()
42 {
43 super();
44 }
45
46 //------------------------------------------------------------------------
47 /**
48 * Constructs a new DaoException with the specified detail message and
49 * cause. <p>Note that the detail message associated with
50 * <code>cause</code> is <i>not</i> automatically incorporated in
51 * this runtime exception's detail message.
52 *
53 * @param aMessage the detail message (which is saved for later retrieval
54 * by the {@link #getMessage()} method).
55 * @param aCause the cause (which is saved for later retrieval by the
56 * {@link #getCause()} method). (A <tt>null</tt> value is
57 * permitted, and indicates that the cause is nonexistent or
58 * unknown.)
59 */
60 public
61 DaoException(String aMessage, Throwable aCause)
62 {
63 super(aMessage, aCause);
64 }
65
66 //------------------------------------------------------------------------
67 /**
68 * Constructs a new DaoException with the specified detail message.
69 *
70 * @param aMessage the detail message. The detail message is saved for
71 * later retrieval by the {@link #getMessage()} method.
72 */
73 public
74 DaoException(String aMessage)
75 {
76 super(aMessage);
77 }
78
79 //------------------------------------------------------------------------
80 /**
81 * Constructs a new DaoException with the specified cause and a
82 * detail message of <tt>(cause==null ? null : cause.toString())</tt>
83 * (which typically contains the class and detail message of
84 * <tt>cause</tt>). This constructor is useful for runtime exceptions
85 * that are little more than wrappers for other throwables.
86 *
87 * @param aCause the cause (which is saved for later retrieval by the
88 * {@link #getCause()} method). (A <tt>null</tt> value is
89 * permitted, and indicates that the cause is nonexistent or
90 * unknown.)
91 */
92 public
93 DaoException(Throwable aCause)
94 {
95 super(aCause);
96 }
97
98 //------------------------------------------------------------------------
99 // members
100 //------------------------------------------------------------------------
101 /**
102 * Default serial version ID
103 */
104 private static final long serialVersionUID = 1L;
105 }