2.17.2: 2011-06-17

net.sf.basedb.core
Enum BioMaterialEvent.Type

java.lang.Object
  extended by java.lang.Enum<BioMaterialEvent.Type>
      extended by net.sf.basedb.core.BioMaterialEvent.Type
All Implemented Interfaces:
Serializable, Comparable<BioMaterialEvent.Type>
Enclosing class:
BioMaterialEvent

public static enum BioMaterialEvent.Type
extends Enum<BioMaterialEvent.Type>

The type of the event.


Enum Constant Summary
CREATION
          An event of this type created a biomaterial.
HYBRIDIZATION
          An event of this type created a hybridization.
OTHER
          An event of this type affected a single biomaterial in some way.
 
Field Summary
private  String displayValue
           
private  int value
           
private static Map<Integer,BioMaterialEvent.Type> valueMapping
          Maps the integer that is stored in the database.
 
Method Summary
static BioMaterialEvent.Type fromValue(int value)
          Get the BioMaterialEvent.Type object when you know the integer code.
 int getValue()
          Get the integer value that is used when storing a BioMaterialEvent.Type to the database.
 String toString()
           
static BioMaterialEvent.Type valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BioMaterialEvent.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CREATION

public static final BioMaterialEvent.Type CREATION
An event of this type created a biomaterial.


HYBRIDIZATION

public static final BioMaterialEvent.Type HYBRIDIZATION
An event of this type created a hybridization.


OTHER

public static final BioMaterialEvent.Type OTHER
An event of this type affected a single biomaterial in some way.

Field Detail

valueMapping

private static final Map<Integer,BioMaterialEvent.Type> valueMapping
Maps the integer that is stored in the database.


value

private final int value

displayValue

private final String displayValue
Method Detail

values

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

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

valueOf

public static BioMaterialEvent.Type 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
NullPointerException - if the argument is null

fromValue

public static BioMaterialEvent.Type fromValue(int value)
Get the BioMaterialEvent.Type object when you know the integer code.

Parameters:
value - The integer value.
Returns:
The type object or null if the value is unknown

toString

public String toString()
Overrides:
toString in class Enum<BioMaterialEvent.Type>

getValue

public int getValue()
Get the integer value that is used when storing a BioMaterialEvent.Type to the database.

Returns:
The intger value of this type

2.17.2: 2011-06-17