Package org.rostore.entity.media
Enum Class RecordOption
- All Implemented Interfaces:
Serializable
,Comparable<RecordOption>
,Constable
Specify behaviour of the system when update or creation of key-value happens.
Needed to change some validation rules if required.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionShould check on the key creation if the key already exist, and if not it should not allow an operationShould check if the update operation is executed on the existing key, and if not it should failThis one if provided should circumvent the version-check and rewrite the version even if not correct -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumSet
<RecordOption> Parses the comma-separated set ofRecordOption
static RecordOption
Returns the enum constant of this class with the specified name.static RecordOption[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ONLY_INSERT
Should check on the key creation if the key already exist, and if not it should not allow an operation -
ONLY_REPLACE
Should check if the update operation is executed on the existing key, and if not it should fail -
OVERRIDE_VERSION
This one if provided should circumvent the version-check and rewrite the version even if not correct
-
-
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
-
parse
Parses the comma-separated set ofRecordOption
- Parameters:
commaSeparated
- list of options separated by the comma- Returns:
- the enum set with the set of options from the list
-