Fish & Chips Club 4.10.0.0

hirondelle.fish.main.codes
Enum CodeTable

Object
  extended by Enum<CodeTable>
      extended by hirondelle.fish.main.codes.CodeTable
All Implemented Interfaces:
Serializable, Comparable<CodeTable>

public enum CodeTable
extends Enum<CodeTable>

All code tables used in this application.

See package summary for important information.


Enum Constant Summary
DISPOSITIONS
          Disposition (general mood) of a Member.
RATINGS
          Restaurant ratings in range 1..10.
RESTAURANTS
          All restaurants known to the application.
SUPPORTED_LOCALES
          The Locales supported by this application.
 
Method Summary
static Code codeFor(Id aCodeId, CodeTable aCodeTable)
          Return a fully populated Code, given its Id and CodeTable.
 Id getTableName()
          Return the name of the code table.
 Boolean hasExplicitOrderColumn()
          Return true only if this code table has an explicit ordering.
static CodeTable valueOf(String name)
          Returns the enum constant of this type with the specified name.
static CodeTable[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

RESTAURANTS

public static final CodeTable RESTAURANTS
All restaurants known to the application.


SUPPORTED_LOCALES

public static final CodeTable SUPPORTED_LOCALES
The Locales supported by this application.


RATINGS

public static final CodeTable RATINGS
Restaurant ratings in range 1..10.


DISPOSITIONS

public static final CodeTable DISPOSITIONS
Disposition (general mood) of a Member.

Method Detail

values

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

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

valueOf

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

getTableName

public Id getTableName()
Return the name of the code table. This name is used as the key for the corresponding List<Code> placed in application scope.


hasExplicitOrderColumn

public Boolean hasExplicitOrderColumn()
Return true only if this code table has an explicit ordering. If there is an explicit order, it is usually related to a database column defined for that purpose.


codeFor

public static Code codeFor(Id aCodeId,
                           CodeTable aCodeTable)
Return a fully populated Code, given its Id and CodeTable.

Called from Model Object constructors that wish to translate a simple Id for a known code table into a fully populated Code, complete with user-presentable text. See CodeTableUtil for more information.


Fish & Chips Club 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.26