Enum Class Entity.State

java.lang.Object
java.lang.Enum<Entity.State>
ch.tocco.nice2.persist.core.api.entity.Entity.State
All Implemented Interfaces:
Serializable, Comparable<Entity.State>, Constable
Enclosing interface:
Entity

public static enum Entity.State extends Enum<Entity.State>
The current state of the in-memory representation of an entity in respect of the database.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The entity has been loaded from the database including all data and hasn't been changed, or was just created and persisted, ie its in-memory representation is in sync with the database.
    The entity has been created in memory but isn't written to the database yet.
    The entity has been loaded from the database including all data and its in-memory representation has uncommitted changes.
    The entity has been loaded from the database, but the data hasn't been fetched yet.
    The object has been invalidated and cannot be used anymore.
    The entity has been deleted from the database, this in-memory representation is just a phantom of an entity that doesn't exist anymore.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    Returns the enum constant of this class with the specified name.
    static Entity.State[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CONCEPTION

      public static final Entity.State CONCEPTION
      The entity has been created in memory but isn't written to the database yet. Such objects have no ID.
    • HOLLOW

      public static final Entity.State HOLLOW
      The entity has been loaded from the database, but the data hasn't been fetched yet. This will happen on the next read or write access.
    • CLEAN

      public static final Entity.State CLEAN
      The entity has been loaded from the database including all data and hasn't been changed, or was just created and persisted, ie its in-memory representation is in sync with the database.
    • DIRTY

      public static final Entity.State DIRTY
      The entity has been loaded from the database including all data and its in-memory representation has uncommitted changes.
    • PHANTOM

      public static final Entity.State PHANTOM
      The entity has been deleted from the database, this in-memory representation is just a phantom of an entity that doesn't exist anymore.
    • INVALID

      public static final Entity.State INVALID
      The object has been invalidated and cannot be used anymore. This can happen due tue a failed second phase of a commit or explicit invalidation of the cache.
  • Method Details

    • values

      public static Entity.State[] 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 Entity.State 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
    • usable

      public boolean usable()
    • physical

      public boolean physical()