Enum Class DsPropagation

java.lang.Object
java.lang.Enum<DsPropagation>
com.baomidou.dynamic.datasource.tx.DsPropagation
All Implemented Interfaces:
Serializable, Comparable<DsPropagation>, Constable

public enum DsPropagation extends Enum<DsPropagation>
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    支持当前事务,如果当前没有事务,就抛出异常。
    如果当前存在事务,则在嵌套事务内执行,如果当前没有事务,就新建一个事务。
    以非事务方式执行,如果当前存在事务,则抛出异常。
    以非事务方式执行操作,如果当前存在事务,就把当前事务挂起。
    支持当前事务,如果当前没有事务,就新建一个事务。这是最常见的选择。
    新建事务,如果当前存在事务,把当前事务挂起。
    支持当前事务,如果当前没有事务,就以非事务方式执行。
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static DsPropagation[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • REQUIRED

      public static final DsPropagation REQUIRED
      支持当前事务,如果当前没有事务,就新建一个事务。这是最常见的选择。
    • REQUIRES_NEW

      public static final DsPropagation REQUIRES_NEW
      新建事务,如果当前存在事务,把当前事务挂起。
    • NOT_SUPPORTED

      public static final DsPropagation NOT_SUPPORTED
      以非事务方式执行操作,如果当前存在事务,就把当前事务挂起。
    • SUPPORTS

      public static final DsPropagation SUPPORTS
      支持当前事务,如果当前没有事务,就以非事务方式执行。
    • NEVER

      public static final DsPropagation NEVER
      以非事务方式执行,如果当前存在事务,则抛出异常。
    • MANDATORY

      public static final DsPropagation MANDATORY
      支持当前事务,如果当前没有事务,就抛出异常。
    • NESTED

      public static final DsPropagation NESTED
      如果当前存在事务,则在嵌套事务内执行,如果当前没有事务,就新建一个事务。
  • Method Details

    • values

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

      public static DsPropagation 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.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null