Enum Class DbUnitOperation

java.lang.Object
java.lang.Enum<DbUnitOperation>
org.dbunit.operation.DbUnitOperation
All Implemented Interfaces:
Serializable, Comparable<DbUnitOperation>, java.lang.constant.Constable

public enum DbUnitOperation extends Enum<DbUnitOperation>
Enumerates the database operations available for use with DbUnitSetup and DbUnitTearDown annotations.

Each constant maps to the corresponding DatabaseOperation constant.

Since:
3.6.0
Author:
Jeff Jensen
See Also:
  • Enum Constant Details

    • NONE

      public static final DbUnitOperation NONE
      Performs no operation.
    • INSERT

      public static final DbUnitOperation INSERT
      Inserts dataset rows. Fails if a row already exists.
    • UPDATE

      public static final DbUnitOperation UPDATE
      Updates existing rows in the dataset.
    • REFRESH

      public static final DbUnitOperation REFRESH
      Inserts or updates rows (upsert).
    • DELETE

      public static final DbUnitOperation DELETE
      Deletes rows matching the dataset.
    • DELETE_ALL

      public static final DbUnitOperation DELETE_ALL
      Deletes all rows from each table in the dataset.
    • TRUNCATE_TABLE

      public static final DbUnitOperation TRUNCATE_TABLE
      Truncates each table in the dataset.
    • CLEAN_INSERT

      public static final DbUnitOperation CLEAN_INSERT
      Deletes all rows then inserts the dataset rows. The default setup operation.
  • Method Details

    • values

      public static DbUnitOperation[] 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 DbUnitOperation 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
    • toDatabaseOperation

      public DatabaseOperation toDatabaseOperation()
      Returns the corresponding DatabaseOperation constant.
      Returns:
      The DatabaseOperation for this enum value.