|
Fish & Chips Club 4.10.0.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objecthirondelle.fish.main.codes.CodeTableUtil
public final class CodeTableUtil
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 |
|---|
public static final SqlId FETCH_RESTO_CODES
public static final SqlId FETCH_LOCALE_CODES
public static final SqlId FETCH_DISPOSITION_CODES
| Constructor Detail |
|---|
public CodeTableUtil()
| Method Detail |
|---|
public static void init(ServletContext aContext)
throws DAOException
StartupTasks, and whenever the
content of a code table changes.
Performs the following :
Id to Code
can be performed by this class
CodeTable.getTableName(), as a List<Code>. This will allow JSPs to reference code
tables directly by name, without any help from an associated Action. (Some might prefer a
Set instead of a List, but a Set would have the disadvantage of hiding any
duplicate items.)
DAOException
static Code populate(Id aCodeId,
CodeTable aCodeTable)
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 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||