Package org.dbunit.operation
Enum Class DbUnitOperation
- All Implemented Interfaces:
Serializable,Comparable<DbUnitOperation>,java.lang.constant.Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDeletes all rows then inserts the dataset rows.Deletes rows matching the dataset.Deletes all rows from each table in the dataset.Inserts dataset rows.Performs no operation.Inserts or updates rows (upsert).Truncates each table in the dataset.Updates existing rows in the dataset. -
Method Summary
Modifier and TypeMethodDescriptionReturns the correspondingDatabaseOperationconstant.static DbUnitOperationReturns the enum constant of this class with the specified name.static DbUnitOperation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
Performs no operation. -
INSERT
Inserts dataset rows. Fails if a row already exists. -
UPDATE
Updates existing rows in the dataset. -
REFRESH
Inserts or updates rows (upsert). -
DELETE
Deletes rows matching the dataset. -
DELETE_ALL
Deletes all rows from each table in the dataset. -
TRUNCATE_TABLE
Truncates each table in the dataset. -
CLEAN_INSERT
Deletes all rows then inserts the dataset rows. The default setup operation.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
toDatabaseOperation
Returns the correspondingDatabaseOperationconstant.- Returns:
- The
DatabaseOperationfor this enum value.
-