Enum Class AggregateCreationPolicy

java.lang.Object
java.lang.Enum<AggregateCreationPolicy>
org.axonframework.modelling.command.AggregateCreationPolicy
All Implemented Interfaces:
Serializable, Comparable<AggregateCreationPolicy>, Constable

public enum AggregateCreationPolicy extends Enum<AggregateCreationPolicy>
Enumeration containing the possible creation policies for aggregates.
Since:
4.3
Author:
Marc Gathier
  • Enum Constant Details

    • ALWAYS

      public static final AggregateCreationPolicy ALWAYS
      Always create a new instance of the aggregate on invoking the method. Fail if already exists.
    • CREATE_IF_MISSING

      public static final AggregateCreationPolicy CREATE_IF_MISSING
      Create a new instance of the aggregate when it is not found.
    • NEVER

      public static final AggregateCreationPolicy NEVER
      Expect instance of the aggregate to exist. Fail if missing.
  • Method Details

    • values

      public static AggregateCreationPolicy[] 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 AggregateCreationPolicy 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