|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jcorporate.expresso.core.db.TableCreator
A singleton utility class that helps create tables. It is stored as a weak reference since it will be seldom used and when done should be discarded.
| Field Summary | |
static String |
USE_CACHED_HSQL
setup name for switch about using HSQL option for 'cached' tables (special case for hsql driver) |
| Constructor Summary | |
protected |
TableCreator()
|
| Method Summary | |
Vector |
createAsNeeded(Schema oneSchema,
String dataContext)
Try to do a search on each DBObject member - if we fail we know the table does not exist. |
protected void |
createIndices(DBObject dbObj,
DBConnection providedConn,
boolean shouldComplain)
create indices, using provided connection if any, and complaining upon failure if specified |
void |
createTable(DBObject dbObj)
Create the table needed by this DB Object in the database. |
protected FastStringBuffer |
createTableSQLDefinition(DBObject dbObj,
FastStringBuffer sqlStatement)
Create the SQL statement to create the table. |
static TableCreator |
getInstance()
The way to a Table Creator's Heart; or more importantly the way to get a reference to a TableCreator object. |
protected com.jcorporate.expresso.core.db.config.JDBCConfig |
getJDBCConfig(String dataContext)
Protected method to get JDBC Configurations whether running Expresso Runtime or not. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String USE_CACHED_HSQL
| Constructor Detail |
protected TableCreator()
| Method Detail |
public static TableCreator getInstance()
public void createTable(DBObject dbObj)
throws DBException
dbObj - The Instantiated Database Object to check against.
DBException - If there's an error creating the table with the
database
protected FastStringBuffer createTableSQLDefinition(DBObject dbObj,
FastStringBuffer sqlStatement)
throws DBException
dbObj - the dbobject where we get the parameters from.sqlStatement - the initialized FastStringBuffer that we're going to
append to. The return value is the same we pass in. Allocation and
deallocation is up to the parent calling this function.
DBException - upon creation error
Modify by Yves Henri AMAIZO
public Vector createAsNeeded(Schema oneSchema,
String dataContext)
throws DBException
oneSchema - The schema to create tables for.dataContext - The database context to create the tables.
DBException - If the create process fails
protected com.jcorporate.expresso.core.db.config.JDBCConfig getJDBCConfig(String dataContext)
throws DBException
dataContext - the Data Context to get the configuration for.
DBException - if there is an error retrieving the JDBC configuration data.
protected void createIndices(DBObject dbObj,
DBConnection providedConn,
boolean shouldComplain)
throws DBException
dbObj - the object whose indices will be createdprovidedConn - any db connection we should use. can be null, in which case we get/dispose of one internallyshouldComplain - whether we should log a warning if index cannot be created. use 'false'
if you are checking established dbobjects, and should not complain if all of the indices already exist
DBException - upon error
|
Expresso 5-6 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||