|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.droplet.EmptyFormHandler atg.droplet.GenericFormHandler atg.droplet.sql.SQLTableManager
public class SQLTableManager
A form handler/bean that provides functionality for creating, dropping, and providing information about the state of a set of tables. Two alternate methods of connecting to the database are used, dependent upon the property UseDataSource. If UseDataSource is set to true, the DataSource and TransactionManager must be configured and will be used for acquiring database connections. If UseDataSource is false or not explicitly set, the ConnectionURL will be used for acquiring database connections.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.droplet.GenericFormHandler |
---|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
SQLTableManager()
|
Method Summary | |
---|---|
void |
createTables()
Creates the tables. |
void |
dropTables()
Drops all of the tables |
boolean |
getAllTablesExist()
Returns true if all specified tables exist |
java.lang.String |
getConnectionURL()
|
java.lang.String |
getCreateSQL()
Returns the SQL that will be used to implement the create tables operation |
java.lang.String |
getDatabaseName(java.sql.Connection conn)
Returns the canonical name for the database that we're using |
javax.sql.DataSource |
getDataSource()
|
java.lang.String |
getDBErrorURL()
|
java.lang.String |
getDropSQL()
Returns the SQL that will be used to implement the dropTables operation |
boolean |
getNoTablesExist()
Returns true if none of the specified tables exist |
SQLTableConfig[] |
getTables()
|
boolean |
getTableStatus(boolean pAllTablesExist)
Go through the list of tables names that we were supplied with. |
javax.transaction.TransactionManager |
getTransactionManager()
|
boolean |
getUseDataSource()
|
boolean |
handleCreateTables(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Creates the tables specified by executing the SQL specified |
boolean |
handleDropTables(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Drops each of the tables specified by the TableNames property |
void |
setConnectionURL(java.lang.String pConnectionURL)
Sets the property ConnectionURL. |
void |
setDataSource(javax.sql.DataSource pDataSource)
Sets the DataSource |
void |
setDBErrorURL(java.lang.String pDBErrorURL)
Sets the property DBErrorURL. |
void |
setTables(SQLTableConfig[] pTables)
Sets the property Tables. |
void |
setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
Sets the TransactionManager |
void |
setUseDataSource(boolean pUseDataSource)
Sets the property UseDataSource |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public SQLTableManager()
Method Detail |
---|
public void setTables(SQLTableConfig[] pTables)
public SQLTableConfig[] getTables()
public void setConnectionURL(java.lang.String pConnectionURL)
public java.lang.String getConnectionURL()
public void setDBErrorURL(java.lang.String pDBErrorURL)
public java.lang.String getDBErrorURL()
public void setUseDataSource(boolean pUseDataSource)
public boolean getUseDataSource()
public void setDataSource(javax.sql.DataSource pDataSource)
public javax.sql.DataSource getDataSource()
public void setTransactionManager(javax.transaction.TransactionManager pTransactionManager)
public javax.transaction.TransactionManager getTransactionManager()
public boolean getTableStatus(boolean pAllTablesExist)
public boolean getAllTablesExist()
public boolean getNoTablesExist()
public void dropTables() throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getDropSQL()
public java.lang.String getCreateSQL()
public java.lang.String getDatabaseName(java.sql.Connection conn)
public void createTables() throws java.sql.SQLException
java.sql.SQLException
public boolean handleCreateTables(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
public boolean handleDropTables(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws java.io.IOException, javax.servlet.ServletException
java.io.IOException
javax.servlet.ServletException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |