Enum Class DbPropagation

java.lang.Object
java.lang.Enum<DbPropagation>
cn.vonce.sql.spring.enumerate.DbPropagation
所有已实现的接口:
Serializable, Comparable<DbPropagation>, java.lang.constant.Constable

public enum DbPropagation extends Enum<DbPropagation>
作者:
Jovi
  • 嵌套类概要

    从类继承的嵌套类/接口 java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • 枚举常量概要

    枚举常量
    枚举常量
    说明
    表示该方法必须在事务中运行,如果当前事务不存在,则会抛出一个异常。
    表示如果当前已经存在一个事务,那么该方法将会在嵌套事务中运行。
    表示当前方法不应该运行在事务上下文中,如果当前正有一个事务在运行,则会抛出异常。
    表示该方法不应该运行在事务中,如果存在当前事务,在该方法运行期间,当前事务将被挂起。
    如果当前没有事务,就新建一个事务,如果已经存在一个事务中,加入到这个事务中。
    表示当前方法必须运行在它自己的事务中。
    表示当前方法不需要事务上下文,但是如果存在当前事务的话,那么这个方法会在这个事务中运行。
  • 方法概要

    修饰符和类型
    方法
    说明
    Returns the enum constant of this class with the specified name.
    static DbPropagation[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    从类继承的方法 java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 枚举常量详细资料

    • REQUIRED

      public static final DbPropagation REQUIRED
      如果当前没有事务,就新建一个事务,如果已经存在一个事务中,加入到这个事务中。
    • SUPPORTS

      public static final DbPropagation SUPPORTS
      表示当前方法不需要事务上下文,但是如果存在当前事务的话,那么这个方法会在这个事务中运行。
    • MANDATORY

      public static final DbPropagation MANDATORY
      表示该方法必须在事务中运行,如果当前事务不存在,则会抛出一个异常。不会主动开启一个事务。
    • REQUIRES_NEW

      public static final DbPropagation REQUIRES_NEW
      表示当前方法必须运行在它自己的事务中。一个新的事务将被启动,如果存在当前事务,在该方法执行期间,当前事务会被挂起(如果一个事务已经存在,则先将这个存在的事务挂起)。
    • NOT_SUPPORTED

      public static final DbPropagation NOT_SUPPORTED
      表示该方法不应该运行在事务中,如果存在当前事务,在该方法运行期间,当前事务将被挂起。
    • NEVER

      public static final DbPropagation NEVER
      表示当前方法不应该运行在事务上下文中,如果当前正有一个事务在运行,则会抛出异常。
    • NESTED

      public static final DbPropagation NESTED
      表示如果当前已经存在一个事务,那么该方法将会在嵌套事务中运行。嵌套的事务可以独立于当前事务进行单独地提交或回滚。如果当前事务不存在,那么其行为与REQUIRED一样。嵌套事务一个非常重要的概念就是内层事务依赖于外层事务。外层事务失败时,会回滚内层事务所做的动作。而内层事务操作失败并不会引起外层事务的回滚。
  • 方法详细资料

    • values

      public static DbPropagation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DbPropagation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值