org.paneris.jal.model
Class DataCache

java.lang.Object
  extended by org.paneris.jal.model.DataCache

public class DataCache
extends java.lang.Object

This class is a Singleton that provides access to datadictionary objects. if a datadictionary has not yet been cached, it is created in the conventional manner. A client gets access to the single instance through the static getInstance() method and can then grap datadictionary objects


Method Summary
 DDRecord getDDRecord(java.lang.String db, java.lang.String tn, java.lang.Integer fn)
          returns a reference to a cached DDRecord (assuming it is cached).
 FieldMetaData getFieldMetaData(java.lang.String db, java.lang.Integer fieldNumber)
          returns a reference to fieldmetadata for a given field (given as an integer)
static DataCache getInstance()
          Returns the single instance, creating one if it's the first time this method is called.
 TableMetaData getTableMetaData(java.lang.String db, java.lang.Integer tableNumber)
          returns a reference to tablemetadata for a given table (given as an Integer)
 TableMetaData getTableMetaData(java.lang.String db, java.lang.String tableName)
          returns a reference to tablemetadata for a given table (given as a string)
 DDRecord putDDRecords(java.lang.String db, java.lang.String tn, java.lang.Integer fn)
           
 FieldMetaData putFieldMetaData(java.lang.String db, java.lang.Integer fieldNumber)
          adds a fieldmetadata for a given field (given as a integer)
 TableMetaData putTableMetaData(java.lang.String db, java.lang.Integer tableNumber)
          adds a tablemetadata for a given table (given as a Integer)
 TableMetaData putTableMetaData(java.lang.String db, java.lang.String tableName)
          adds a tablemetadata for a given table (given as a string)
 void removeDDRecords(java.lang.String db, java.lang.String tn, java.lang.Integer fn)
          removes a tablemetadata for a given table (given as a string)
 void removeFieldMetaData(java.lang.String db, java.lang.Integer fieldNumber)
          removes a tablemetadata for a given table (given as a string)
 void removeTableMetaData(java.lang.String db, java.lang.Integer tableNumber)
          removes a tablemetadata for a given table (given as a string)
 void removeTableMetaData(java.lang.String db, java.lang.String tableName)
          removes a tablemetadata for a given table (given as a string)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DataCache getInstance()
Returns the single instance, creating one if it's the first time this method is called.

Returns:
DataCache - The single instance.

getTableMetaData

public TableMetaData getTableMetaData(java.lang.String db,
                                      java.lang.String tableName)
                               throws java.lang.Exception
returns a reference to tablemetadata for a given table (given as a string)

Throws:
java.lang.Exception

putTableMetaData

public TableMetaData putTableMetaData(java.lang.String db,
                                      java.lang.String tableName)
                               throws java.lang.Exception
adds a tablemetadata for a given table (given as a string)

Throws:
java.lang.Exception

removeTableMetaData

public void removeTableMetaData(java.lang.String db,
                                java.lang.String tableName)
                         throws java.lang.Exception
removes a tablemetadata for a given table (given as a string)

Throws:
java.lang.Exception

getTableMetaData

public TableMetaData getTableMetaData(java.lang.String db,
                                      java.lang.Integer tableNumber)
                               throws java.lang.Exception
returns a reference to tablemetadata for a given table (given as an Integer)

Throws:
java.lang.Exception

putTableMetaData

public TableMetaData putTableMetaData(java.lang.String db,
                                      java.lang.Integer tableNumber)
                               throws java.lang.Exception
adds a tablemetadata for a given table (given as a Integer)

Throws:
java.lang.Exception

removeTableMetaData

public void removeTableMetaData(java.lang.String db,
                                java.lang.Integer tableNumber)
                         throws java.lang.Exception
removes a tablemetadata for a given table (given as a string)

Throws:
java.lang.Exception

getFieldMetaData

public FieldMetaData getFieldMetaData(java.lang.String db,
                                      java.lang.Integer fieldNumber)
                               throws java.lang.Exception
returns a reference to fieldmetadata for a given field (given as an integer)

Throws:
java.lang.Exception

putFieldMetaData

public FieldMetaData putFieldMetaData(java.lang.String db,
                                      java.lang.Integer fieldNumber)
                               throws java.lang.Exception
adds a fieldmetadata for a given field (given as a integer)

Throws:
java.lang.Exception

removeFieldMetaData

public void removeFieldMetaData(java.lang.String db,
                                java.lang.Integer fieldNumber)
                         throws java.lang.Exception
removes a tablemetadata for a given table (given as a string)

Throws:
java.lang.Exception

getDDRecord

public DDRecord getDDRecord(java.lang.String db,
                            java.lang.String tn,
                            java.lang.Integer fn)
                     throws java.lang.Exception
returns a reference to a cached DDRecord (assuming it is cached). if it isn't, then it just does the sql lookup itself. This is used for caching of automatic lookup fields

Throws:
java.lang.Exception

putDDRecords

public DDRecord putDDRecords(java.lang.String db,
                             java.lang.String tn,
                             java.lang.Integer fn)
                      throws java.lang.Exception
Throws:
java.lang.Exception

removeDDRecords

public void removeDDRecords(java.lang.String db,
                            java.lang.String tn,
                            java.lang.Integer fn)
                     throws java.lang.Exception
removes a tablemetadata for a given table (given as a string)

Throws:
java.lang.Exception


Copyright © 2000-2008 PanEris. All Rights Reserved.