Enum Class EntityHandling

java.lang.Object
java.lang.Enum<EntityHandling>
ch.tocco.nice2.rest.entity.spi.rebind.EntityHandling
All Implemented Interfaces:
Serializable, Comparable<EntityHandling>, Constable

public enum EntityHandling extends Enum<EntityHandling>
Controls the way a given EntityBean is applied to the Entity.
  • Enum Constant Details

    • COMPLETE

      public static final EntityHandling COMPLETE
      If the given bean contains a key, the existing entity is updated. Note that the entire entity is updated. This means, that a full representation of the entity is required. If no value is given for a certain field or relation, it is cleared. See PATCH for partial updates. This is the default entity handling.
    • PATCH

      public static final EntityHandling PATCH
      Execute a partial update on an entity. The bean must contain a key of an entity that already exists. All data that the given bean contains is applied to the entity. If the bean contains no data for a certain field or relation, the field or relation remains untouched.
  • Method Details

    • values

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