1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.kernel.annotation;
16  
17  import java.lang.annotation.Documented;
18  import java.lang.annotation.ElementType;
19  import java.lang.annotation.Inherited;
20  import java.lang.annotation.Retention;
21  import java.lang.annotation.RetentionPolicy;
22  import java.lang.annotation.Target;
23  
24  @Documented
25  @Inherited
26  @Retention(RetentionPolicy.RUNTIME)
27  @Target({ElementType.METHOD, ElementType.TYPE})
28  /**
29   * <a href="Transactional.java.html"><b><i>View Source</i></b></a>
30   *
31   * @author Brian Wing Shun Chan
32   */
33  public @interface Transactional {
34  
35      public Isolation isolation() default Isolation.DEFAULT;
36  
37      public Class<? extends Throwable>[] noRollbackFor() default {};
38  
39      public String[] noRollbackForClassName() default {};
40  
41      public Propagation propagation() default Propagation.REQUIRED;
42  
43      public boolean readOnly() default false;
44  
45      public Class<? extends Throwable>[] rollbackFor() default {};
46  
47      public String[] rollbackForClassName() default {};
48  
49      public int timeout() default TransactionDefinition.TIMEOUT_DEFAULT;
50  
51  }