Enum Class ModelPersistence

java.lang.Object
java.lang.Enum<ModelPersistence>
io.fluxzero.sdk.modeling.ModelPersistence
All Implemented Interfaces:
Serializable, Comparable<ModelPersistence>, Constable

public enum ModelPersistence extends Enum<ModelPersistence>
Defines the durable representation and authoritative load path of a Model.

This choice is independent from event publication and from internal documents used to compose model graphs.

  • Enum Constant Details

    • EVENT_SOURCED

      public static final ModelPersistence EVENT_SOURCED
      Reconstruct state from the model event stream and do not maintain a directly searchable current document.
    • EVENT_SOURCED_WITH_DOCUMENT

      public static final ModelPersistence EVENT_SOURCED_WITH_DOCUMENT
      Reconstruct state from the event stream and also maintain a directly searchable current document.
    • DOCUMENT

      public static final ModelPersistence DOCUMENT
      Treat the current document as authoritative and load state directly through the configured document serializer.
  • Method Details

    • values

      public static ModelPersistence[] 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 ModelPersistence 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
    • isEventSourced

      public boolean isEventSourced()
      Whether normal loads reconstruct state from stored model events.
    • storesDocument

      public boolean storesDocument()
      Whether commits maintain a directly searchable current document.