2.17.2: 2011-06-17

net.sf.basedb.core.log
Enum ChangeType

java.lang.Object
  extended by java.lang.Enum<ChangeType>
      extended by net.sf.basedb.core.log.ChangeType
All Implemented Interfaces:
Serializable, Comparable<ChangeType>

public enum ChangeType
extends Enum<ChangeType>

Enumeration that representst the type of change that has happened.

Version:
2.13
Author:
Nicklas
Last modified
$Date: 2009-08-18 13:24:48 +0200 (Tue, 18 Aug 2009) $

Enum Constant Summary
CREATE
           
DELETE
           
UPDATE
           
 
Field Summary
private  int value
           
private  String was
           
 
Method Summary
static ChangeType fromValue(int value)
          Get the change type corresponding to the given numerical value.
 int getValue()
          Get the numerical value for this change type.
static ChangeType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ChangeType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 String was(String what)
          Create a string for display purposes that explains what has happened to the what.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CREATE

public static final ChangeType CREATE

UPDATE

public static final ChangeType UPDATE

DELETE

public static final ChangeType DELETE
Field Detail

value

private final int value

was

private final String was
Method Detail

values

public static ChangeType[] 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 (ChangeType c : ChangeType.values())
    System.out.println(c);

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

valueOf

public static ChangeType 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

getValue

public int getValue()
Get the numerical value for this change type. Each change type has a unique value.


was

public String was(String what)
Create a string for display purposes that explains what has happened to the what. For example, if what is 'Annotation', this method may return 'Annotation created'.

Parameters:
what - The 'what' that something happened to
Returns:
A string

fromValue

public static ChangeType fromValue(int value)
Get the change type corresponding to the given numerical value.

Parameters:
value - The numerical value
Returns:
The change type, or null if there is no change type with the same valye

2.17.2: 2011-06-17