public class SQLTableManager extends GenericFormHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
SQLTableManager() |
Modifier and Type | Method and Description |
---|---|
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
|
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
afterGet, beforeGet
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
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