Enum Class Database.Lock

java.lang.Object
java.lang.Enum<Database.Lock>
is.codion.common.db.database.Database.Lock
All Implemented Interfaces:
Serializable, Comparable<Database.Lock>, Constable
Enclosing interface:
Database

public static enum Database.Lock extends Enum<Database.Lock>
How a select for update treats a row locked by another transaction.
  • Enum Constant Details

    • WAIT

      public static final Database.Lock WAIT
      Waits until the lock is released, or until the wait is ended by the database's own lock timeout, where it has one, or by the query timeout, where the database honours it during a lock wait.
    • NOWAIT

      public static final Database.Lock NOWAIT
      Fails at once, where the database supports it, waiting otherwise.
  • Method Details

    • values

      public static Database.Lock[] 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 Database.Lock 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