org.addsimplicity.anicetus.entity
Enum CompletionStatus

java.lang.Object
  extended by java.lang.Enum<CompletionStatus>
      extended by org.addsimplicity.anicetus.entity.CompletionStatus
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CompletionStatus>

public enum CompletionStatus
extends java.lang.Enum<CompletionStatus>

The completion status defines the outcome of a session or transaction.

Author:
Dan Pritchett (driveawedge@yahoo.com)

Enum Constant Summary
Failure
          The execution failed.
PartialSuccess
          The execution completed, but only part of the task goals were completed.
Success
          The execution completed successfully.
Unknown
          The completion status was not set by the application.
 
Method Summary
static CompletionStatus fromAbbreviation(char abbrev)
          Translate the single letter status abbreviation to the enumeration instance.
 char getAbbreviation()
          Get the abbreviation from the enumeration.
static CompletionStatus valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CompletionStatus[] 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

Success

public static final CompletionStatus Success
The execution completed successfully.


Failure

public static final CompletionStatus Failure
The execution failed.


PartialSuccess

public static final CompletionStatus PartialSuccess
The execution completed, but only part of the task goals were completed.


Unknown

public static final CompletionStatus Unknown
The completion status was not set by the application.

Method Detail

values

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

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

valueOf

public static CompletionStatus valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

fromAbbreviation

public static CompletionStatus fromAbbreviation(char abbrev)
Translate the single letter status abbreviation to the enumeration instance.

Parameters:
abbrev - The single letter abbreviation.
Returns:
the enumeration that maps to the status or null if the status is invalid.

getAbbreviation

public char getAbbreviation()
Get the abbreviation from the enumeration.

Returns:
the abbreviation.


Copyright © 2009 Add Simplicity. All Rights Reserved.