com.flexive.shared
Enum FxLockType

java.lang.Object
  extended by java.lang.Enum<FxLockType>
      extended by com.flexive.shared.FxLockType
All Implemented Interfaces:
ObjectWithLabel, java.io.Serializable, java.lang.Comparable<FxLockType>

public enum FxLockType
extends java.lang.Enum<FxLockType>
implements ObjectWithLabel

Type of a FxLock

Author:
Markus Plesser (markus.plesser@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)

Enum Constant Summary
Loose
          Loose lock, which can be taken over or unlocked by other users
None
          No lock is set
Permanent
          explicit lock, may only be taken over or unlocked only by global- and mandator-supervisors
 
Method Summary
static FxLockType getById(int id)
           
 int getId()
          Get the id used in the storage
 FxString getLabel()
          Return the localized label of the object.
static FxLockType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FxLockType[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

None

public static final FxLockType None
No lock is set


Loose

public static final FxLockType Loose
Loose lock, which can be taken over or unlocked by other users


Permanent

public static final FxLockType Permanent
explicit lock, may only be taken over or unlocked only by global- and mandator-supervisors

Method Detail

values

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

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

valueOf

public static FxLockType 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
java.lang.NullPointerException - if the argument is null

getId

public int getId()
Get the id used in the storage

Returns:
id used in the storage

getLabel

public FxString getLabel()
Return the localized label of the object.

Specified by:
getLabel in interface ObjectWithLabel
Returns:
the localized label for the object.

getById

public static FxLockType getById(int id)
                          throws FxLockException
Throws:
FxLockException