org.spicefactory.pimento.config
Enum Operation

java.lang.Object
  extended by java.lang.Enum<Operation>
      extended by org.spicefactory.pimento.config.Operation
All Implemented Interfaces:
Serializable, Comparable<Operation>

public enum Operation
extends Enum<Operation>

Enumeration for the available EntityManager operations.

Author:
Jens Halm

Enum Constant Summary
ALL
          Constant for all operations.
LOAD
          Constant for load operations.
MERGE
          Constant for merge operations.
NAMED_QUERY
          Constant for named query operations.
PERSIST
          Constant for persist operations.
QUERY
          Constant for JPAQL query operations.
READ
          Constant for read operations.
REMOVE
          Constant for remove operations.
WRITE
          Constant for write operations.
 
Method Summary
static Operation valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Operation[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LOAD

public static final Operation LOAD
Constant for load operations. This includes the load, initialize and refresh operations of the EntityManager remote service (all operations that load a single entity by id).


QUERY

public static final Operation QUERY
Constant for JPAQL query operations. These are queries created with the createQuery method of the EntityManager remote service.


NAMED_QUERY

public static final Operation NAMED_QUERY
Constant for named query operations. These are queries created with the createNamedQuery method of the EntityManager remote service.


PERSIST

public static final Operation PERSIST
Constant for persist operations.


MERGE

public static final Operation MERGE
Constant for merge operations.


REMOVE

public static final Operation REMOVE
Constant for remove operations.


READ

public static final Operation READ
Constant for read operations. This includes all operations represented by the LOAD, QUERY and NAMED_QUERY constants.


WRITE

public static final Operation WRITE
Constant for write operations. This includes all operations represented by the PERSIST, MERGE and REMOVE constants.


ALL

public static final Operation ALL
Constant for all operations.

Method Detail

values

public static final Operation[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Operation c : Operation.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Operation valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name