java.lang.Object
java.lang.Enum<Operation>
org.gcube.informationsystem.resourceregistry.persistence.Operation
All Implemented Interfaces:
Serializable, Comparable<Operation>, Constable

public enum Operation extends Enum<Operation>
Identifies the kind of action a persistence-layer management class is currently performing on an element (Context, Type, or Instance), independently of which concrete class or collection is involved. Database-agnostic and carries no OrientDB-specific concept; each constant also reports whether it is a read-only (isSafe()) operation.
Author:
Luca Frosini (ISTI - CNR)
  • Enum Constant Details

    • CREATE

      public static final Operation CREATE
      The database element creation operation.
    • EXISTS

      public static final Operation EXISTS
      The check existence operation (read-only).
    • READ

      public static final Operation READ
      The read operation (read-only).
    • UPDATE

      public static final Operation UPDATE
      The update operation.
    • DELETE

      public static final Operation DELETE
      The deletion operation.
    • ADD_TO_CONTEXT

      public static final Operation ADD_TO_CONTEXT
      The add to context/share operation.
    • REMOVE_FROM_CONTEXT

      public static final Operation REMOVE_FROM_CONTEXT
      The remove from context/unshare operation.
    • QUERY

      public static final Operation QUERY
      The graph traversal query operation (read-only).
    • GET_METADATA

      public static final Operation GET_METADATA
      The metadata retrieval operation (read-only).
  • Method Details

    • values

      public static Operation[] 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 Operation 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
    • isSafe

      public boolean isSafe()
      Returns whether this is a read-only/safe operation.
      Returns:
      true if this operation is safe/read-only, false otherwise