/*
 * Copyright 2013 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.mybatis.cdi;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;

import org.apache.ibatis.session.ExecutorType;

/**
 * Adds transaction demarcation to the annotated method.
 * 
 * @author Frank David Martínez
 */
@InterceptorBinding
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Transactional {

  /**
   * Returns the constant indicating the myBatis executor type.
   *
   * @return the constant indicating the myBatis executor type.
   */
  @Nonbinding
  ExecutorType executorType() default ExecutorType.SIMPLE;

  /**
   * Returns the constant indicating the transaction isolation level.
   *
   * @return the constant indicating the transaction isolation level.
   */
  @Nonbinding
  Isolation isolation() default Isolation.DEFAULT;

  /**
   * Flag to indicate that myBatis has to force the transaction {@code commit().}
   *
   * @return false by default, user defined otherwise.
   */
  @Nonbinding
  boolean force() default false;

  /**
   * If true, the transaction will never committed but rather rolled back, useful for testing purposes.
   *
   * This parameter is false by default.
   *
   * @return if true, the transaction will never committed but rather rolled back, useful for testing purposes.
   */
  @Nonbinding
  boolean rollbackOnly() default false;

  /**
   * Defines zero (0) or more exception {@link Class classes}, which must be a
   * subclass of {@link Throwable}, indicating which exception types must cause
   * a transaction rollback.
   */
  @Nonbinding  
  Class<? extends Throwable>[] rollbackFor() default {};
  
}

@@ -1264,56 +1264,61 @@
 urn 
-the constant indicating the myBatis executor typ
+ExecutorType.SIMPLE by default, user defined otherwis
 e.%0A 
@@ -1494,63 +1494,60 @@
 urn 
-the constant indicating the transaction isolation level
+Isolation.DEFAULT by default, user defined otherwise
 .%0A  
@@ -1942,159 +1942,56 @@
   * 
-This parameter is false by default.%0A   *%0A   * @return if true, the transaction will never committed but rather rolled back, useful for testing purpo
+@return false by default, user defined otherwi
 se
-s
 .%0A  
@@ -2097,20 +2097,20 @@
 ption %7B@
-link
+code
  Class c
@@ -2157,12 +2157,12 @@
 f %7B@
-link
+code
  Thr
@@ -2243,16 +2243,87 @@
 llback.%0A
+   * %0A   * @return an empty array by default, user defined otherwise. %0A
    */%0A  

fix javadoc warns