01: /*
02: * Copyright 2002-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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 {@link RollbackRuleAttribute} that has the opposite behavior
21: * to the <code>RollbackRuleAttribute</code> superclass.
22: *
23: * @author Rod Johnson
24: * @since 09.04.2003
25: */
26: public class NoRollbackRuleAttribute extends RollbackRuleAttribute {
27:
28: /**
29: * Create a new instance of the <code>NoRollbackRuleAttribute</code> class
30: * for the supplied {@link Throwable} class.
31: * @param clazz the <code>Throwable</code> class
32: * @see RollbackRuleAttribute#RollbackRuleAttribute(Class)
33: */
34: public NoRollbackRuleAttribute(Class clazz) {
35: super (clazz);
36: }
37:
38: /**
39: * Create a new instance of the <code>NoRollbackRuleAttribute</code> class
40: * for the supplied <code>exceptionName</code>.
41: * @param exceptionName the exception name pattern
42: * @see RollbackRuleAttribute#RollbackRuleAttribute(String)
43: */
44: public NoRollbackRuleAttribute(String exceptionName) {
45: super (exceptionName);
46: }
47:
48: public String toString() {
49: return "No" + super.toString();
50: }
51:
52: }
|