Package com.opencqrs.framework.command
Enum Class Command.SubjectCondition
- All Implemented Interfaces:
Serializable,Comparable<Command.SubjectCondition>,Constable
- Enclosing interface:
Command
The subject condition checked before
CommandHandler execution.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAssures that the given subject exists, that is at least oneEventwas sourced with that specificEvent.subject(), in spite of any recursive subjects.No condition checks apply to the given subject.Assures that the given subject does not exist, that is noEventwas sourced with that specificEvent.subject(), in spite of any recursive subjects. -
Method Summary
Modifier and TypeMethodDescriptionstatic Command.SubjectConditionReturns the enum constant of this class with the specified name.static Command.SubjectCondition[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No condition checks apply to the given subject. -
PRISTINE
Assures that the given subject does not exist, that is noEventwas sourced with that specificEvent.subject(), in spite of any recursive subjects. OtherwiseCommandSubjectAlreadyExistsExceptionwill be thrown.The condition cannot be checked properly, if
SourcingMode.NONEis used. -
EXISTS
Assures that the given subject exists, that is at least oneEventwas sourced with that specificEvent.subject(), in spite of any recursive subjects. OtherwiseCommandSubjectDoesNotExistExceptionwill be thrown.The condition cannot be checked properly, if
SourcingMode.NONEis used.
-
-
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
-