org.paneris.jal.model
Class TableMetaData

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

public class TableMetaData
extends java.lang.Object

A TableMetaData encapsulates meta data for a single table in the datadictionary. It has a hashtable for datadictionary fields.

It can be constructed from the table name or from the table id number.

You need to pass a table identifier and a database to the constructors


Constructor Summary
TableMetaData(java.lang.String db, java.lang.Integer tn)
          constructor to build a table given it's id in the datadictionarytables table
TableMetaData(java.lang.String db, java.lang.String tn)
          Constructor to build a table using a table name
 
Method Summary
 java.lang.String applyMaxResults(java.lang.String db, java.lang.String sql)
          apply the max results if appropriate
 boolean getCached()
          find out if the table is cached
 java.lang.String getDisplayName()
          Get the display name for the table.
 ExtendedHash getFields()
           
 boolean getListEdit()
          allow this table to be edited as part of a list
 int getMaxResults()
          get the maximum number of results for this table
 java.lang.Integer getResultsPerPage()
          get the default results per page
 java.lang.String getTableName()
          get the tablename
 java.lang.Integer getTableNumber()
          get the tablenumber
 java.lang.String getType()
          get the type of the table
 java.lang.String getUpdateController()
          allow this table to be edited as part of a list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableMetaData

public TableMetaData(java.lang.String db,
                     java.lang.String tn)
              throws java.lang.Exception
Constructor to build a table using a table name

Throws:
java.lang.Exception

TableMetaData

public TableMetaData(java.lang.String db,
                     java.lang.Integer tn)
              throws java.lang.Exception
constructor to build a table given it's id in the datadictionarytables table

Throws:
java.lang.Exception
Method Detail

getFields

public ExtendedHash getFields()
Returns:
a hash of field data for this table

getTableName

public java.lang.String getTableName()
get the tablename


getListEdit

public boolean getListEdit()
allow this table to be edited as part of a list


getUpdateController

public java.lang.String getUpdateController()
allow this table to be edited as part of a list


getType

public java.lang.String getType()
get the type of the table


getTableNumber

public java.lang.Integer getTableNumber()
get the tablenumber


getResultsPerPage

public java.lang.Integer getResultsPerPage()
get the default results per page


getMaxResults

public int getMaxResults()
get the maximum number of results for this table


applyMaxResults

public java.lang.String applyMaxResults(java.lang.String db,
                                        java.lang.String sql)
                                 throws java.lang.Exception
apply the max results if appropriate

Throws:
java.lang.Exception

getDisplayName

public java.lang.String getDisplayName()
Get the display name for the table.


getCached

public boolean getCached()
find out if the table is cached



Copyright © 2000-2008 PanEris. All Rights Reserved.