KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > transaction > interceptor > NoRollbackRuleAttribute


1 /*
2  * Copyright 2002-2005 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.transaction.interceptor;
18
19 /**
20  * Tag subclass of RollbackRule. Its class name means that it has the
21  * opposite behavior to the RollbackRule superclass.
22  *
23  * @author Rod Johnson
24  * @since 09.04.2003
25  */

26 public class NoRollbackRuleAttribute extends RollbackRuleAttribute {
27     
28     /**
29      * Construct a new NoRollbackRule for the given throwable class.
30      * @param clazz throwable class
31      */

32     public NoRollbackRuleAttribute(Class JavaDoc clazz) {
33         super(clazz);
34     }
35
36     /**
37      * Construct a new NoRollbackRule for the given exception name.
38      * This can be a substring, with no wildcard support at present.
39      * A value of "ServletException" would match ServletException and
40      * subclasses, for example.
41      * @param exceptionName the exception pattern
42      */

43     public NoRollbackRuleAttribute(String JavaDoc exceptionName) {
44         super(exceptionName);
45     }
46     
47     public String JavaDoc toString() {
48         return "No" + super.toString();
49     }
50     
51     // rely on superclass equals and hashCode methods
52
}
53
Popular Tags