NoRollbackRuleAttribute.java
Upload User: jiancairen
Upload Date: 2007-08-27
Package Size: 26458k
Code Size: 2k
Category:

Java Develop

Development Platform:

Java

  1. /*
  2.  * Copyright 2002-2004 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. package org.springframework.transaction.interceptor;
  17. /**
  18.  * Tag class. Its class means it has the opposite behaviour to the
  19.  * RollbackRule superclass.
  20.  * @author Rod Johnson
  21.  * @since 09-Apr-2003
  22.  */
  23. public class NoRollbackRuleAttribute extends RollbackRuleAttribute {
  24. /**
  25.  * Constrct a new NoRollbackRule for the given throwable class.
  26.  * @param clazz throwable class
  27.  */
  28. public NoRollbackRuleAttribute(Class clazz) {
  29. super(clazz);
  30. }
  31. /**
  32.  * Construct a new NoRollbackRule for the given exception name.
  33.  * This can be a substring, with no wildcard support at present.
  34.  * A value of "ServletException" would match ServletException and
  35.  * subclasses, for example.
  36.  * @param exceptionName the exception pattern
  37.  */
  38. public NoRollbackRuleAttribute(String exceptionName) {
  39. super(exceptionName);
  40. }
  41. public String toString() {
  42. return "No" + super.toString();
  43. }
  44. // rely on superclass equals() and hashCode methods
  45. }