DomainFailure.java

  1. package de.japrost.jabudget.domain;

  2. /**
  3.  * Failure codes for {@link DomainException}.
  4.  */
  5. public enum DomainFailure {
  6.     /**
  7.      * The entity to operate on already exists. E.g. when creating a new one.
  8.      */
  9.     DUPLICATE_ENTITY,
  10.     /**
  11.      * The entity to operate on does not exist. E.g. when try updating an existing one.
  12.      */
  13.     MISSING_ENTITY,
  14.     /**
  15.      * The object to operate on has reference to an entity that does not exist.
  16.      */
  17.     MISSING_ENTITY_REFERENCE,
  18.     /**
  19.      * The entity to locate does not exist. E.g. when try finding an existing one.
  20.      */
  21.     ENTITY_NOT_AVAILABLE;
  22. }