uk.org.ury.backend.database
Enum UserClass

java.lang.Object
  extended by java.lang.Enum<UserClass>
      extended by uk.org.ury.backend.database.UserClass
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<UserClass>

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

The various user classes of the database driver. These refer to various users in the database proper, and thus grant various levels of permission to the program. Please use the least privileged user class that works. For most cases, READ_ONLY should work perfectly.

Author:
Matt Windsor

Enum Constant Summary
READ_ONLY
           
READ_WRITE
           
 
Field Summary
 java.lang.String configName
          The name of the tag in the configuration file that contains the credentials for this user class.
 
Method Summary
static UserClass valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static UserClass[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

READ_ONLY

public static final UserClass READ_ONLY

READ_WRITE

public static final UserClass READ_WRITE
Field Detail

configName

public java.lang.String configName
The name of the tag in the configuration file that contains the credentials for this user class.

Method Detail

values

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

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

valueOf

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