Fish & Chips Club 4.10.0.0

hirondelle.fish.main.codes
Class CodeTableUtil

Object
  extended by hirondelle.fish.main.codes.CodeTableUtil

public final class CodeTableUtil
extends Object

Fetches code tables from the database upon startup.

Operations performed : SQL statements.

See package summary for important information.


Field Summary
static SqlId FETCH_DISPOSITION_CODES
           
static SqlId FETCH_LOCALE_CODES
           
static SqlId FETCH_RESTO_CODES
           
 
Constructor Summary
CodeTableUtil()
           
 
Method Summary
static void init(ServletContext aContext)
          Called by the application's implementation of StartupTasks, and whenever the content of a code table changes.
(package private) static Code populate(Id aCodeId, CodeTable aCodeTable)
          Return a fully populated Code, given its Id and CodeTable.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FETCH_RESTO_CODES

public static final SqlId FETCH_RESTO_CODES

FETCH_LOCALE_CODES

public static final SqlId FETCH_LOCALE_CODES

FETCH_DISPOSITION_CODES

public static final SqlId FETCH_DISPOSITION_CODES
Constructor Detail

CodeTableUtil

public CodeTableUtil()
Method Detail

init

public static void init(ServletContext aContext)
                 throws DAOException
Called by the application's implementation of StartupTasks, and whenever the content of a code table changes.

Performs the following :

Throws:
DAOException

populate

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

Called from Model Objects constructors that need to translate a simple Id for a known code table into a fully populated Code.

[Bug Fix Sep 10 2007]
If aCodeId is itself null, then null is returned.

Design Note:
This item is package-private. The CodeTable.codeFor(Id, CodeTable) method is a public version of this method, and simply does a call forward to this one. The reason is simply to reduce the number of imports needed in Model Objects that use Codes from 3 to 2 : Code and CodeTable.


Fish & Chips Club 4.10.0.0

Copyright Hirondelle Systems - Generated 2013Oct19.12.26