KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > persistence > PersistenceException


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package javax.persistence;
24
25
26 /**
27  * Thrown by the persistence provider when a problem occurs.
28  * All instances of <code>PersistenceException</code> except for instances of
29  * {@link NoResultException} and {@link NonUniqueResultException} will cause
30  * the current transaction, if one is active, to be marked for rollback.
31  *
32  * @since Java Persistence 1.0
33  */

34 public class PersistenceException extends RuntimeException JavaDoc {
35
36         /**
37          * Constructs a new <code>PersistenceException</code> exception
38          * with <code>null</code> as its detail message.
39          */

40     public PersistenceException() {
41         super();
42     }
43
44         /**
45          * Constructs a new <code>PersistenceException</code> exception
46          * with the specified detail message.
47          * @param message the detail message.
48          */

49     public PersistenceException(String JavaDoc message) {
50         super(message);
51     }
52
53         /**
54          * Constructs a new <code>PersistenceException</code> exception
55          * with the specified detail message and cause.
56          * @param message the detail message.
57          * @param cause the cause.
58          */

59     public PersistenceException(String JavaDoc message, Throwable JavaDoc cause) {
60         super(message, cause);
61     }
62     
63         /**
64          * Constructs a new <code>PersistenceException</code> exception
65          * with the specified cause.
66          * @param cause the cause.
67          */

68     public PersistenceException(Throwable JavaDoc cause) {
69         super(cause);
70     }
71 };
72
73
Popular Tags