public abstract class DatabaseConnection extends SimpleManipulator implements ConnectionClosedListener, SimulationListener
SimpleDataSource.NameEditorDataDataSource.Writable| Modifier and Type | Field and Description |
|---|---|
static boolean |
alwaysCloseConnection
This will be set to true if an IllegalMonitorStateException is thrown when dealing with the connection.
|
static int |
debugLevel
The debug level for this bean.
|
static int |
HSQLDB
The connection is to HSQLDB.
|
java.text.DateFormat |
logDateFormat
used for all the debugLevel/consoleReport logging
|
static int |
MYSQL
The connection is to MYSQL.
|
static int |
ORACLE
The connection is to ORACLE.
|
static int |
OTHER
The connection is to a database we don't have an interest in.
|
static int |
POSTGRES
The connection is to SQLITE.
|
static int |
SQLITE
The connection is to SQLITE.
|
cvsRevUPDATE_DISPLAYED_VALUE, VALUE_INPUTcustomTimer, EXPORT_READ_ONLY, EXPORT_READ_WRITE, NO_EXPORT, requiresSyncWrite, sharedTimer, syncWriteTimeout, timebaseautoSuspend, AUTOSUSPEND_DEFAULT, AUTOSUSPEND_NEVER, AUTOSUSPEND_NO_LISTENERS, AUTOSUSPEND_NO_LISTENERS_AND_NO_SOURCES, colorHi, colorHiHi, colorLo, colorLoLo, colorNormal, connectors, consoleLogger, currentColor, currentValue, DEFAULT_AUTOSUSPEND, dontConnect, gwtLog, hardSuspended, popupLogger, PRIMARYOUTPORTNAME, sendColors, stopped, suspended, timedPopupLogger, traceLogger, valueHi, valueHiHi, valueLo, valueLoLocvsRev| Constructor and Description |
|---|
DatabaseConnection() |
| Modifier and Type | Method and Description |
|---|---|
void |
connectionClosed(ConnectionClosedEvent cce)
This method is called by the connection pool when a (the?) connection to the database is closed.
|
java.lang.String |
eventInfo(ValueChangedEvent e) |
java.lang.String |
getConnectionName() |
boolean |
getConsoleReport()
gets whether or not a console report is desired.
|
int |
getDataBaseType()
This method will return one of the defined constants for the connection
type.
|
java.lang.String |
getDateColumnName() |
java.lang.String |
getTableName()
Returns the name of the table.
|
boolean |
isCreateIndex() |
boolean |
isCreateTable() |
boolean |
isMillisPrecision() |
boolean |
isSynchronizeConnection() |
void |
logInfo(java.lang.String msg)
Logs messages for debugLevel and/or consoleReport settings.
|
void |
messageString(java.lang.String msg)
Logs error and some informational messages.
|
void |
setConnectionName(java.lang.String connectionName) |
void |
setConsoleReport(boolean newValue)
sets whether or not a console report is desired.
|
void |
setCreateIndex(boolean createIndex) |
void |
setCreateTable(boolean createTable) |
void |
setDateColumnName(java.lang.String dateColumnName) |
void |
setMillisPrecision(boolean millisPrecision) |
void |
setSimulationFlag(boolean simulationFlag)
Sets the state of the simulation flag.
|
void |
setSynchronizeConnection(boolean synchronizeConnection) |
void |
setTableName(java.lang.String tableName)
Sets the name of the table.
|
void |
simulationStateChanged(SimulationChangedEvent simulationChangedEvent)
Changes the state of the simulation mode.
|
void |
start()
Enable data saving and attempt a save if a trigger has been seen.
|
void |
stop()
Close the connection.
|
boolean |
tableExists(java.lang.String tableName)
Returns true if the given tablename exists in the database, otherwise false.
|
java.lang.String |
toString()
Provides the internal byte and array output as a String.
|
getDefaultQualityForLocationgetInPortNames, getStaticLocationFor, setBooleanValue, setBoolValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setShortValue, setStringValue, valueChanged, valueInputaddConnector, addConnector, addDataSource, addPropertyChangeListener, addValueChangedListener, addVetoableChangeListener, authenticatedClientRequest, clientRequest, clientResponse, destroy, determineSuspendedStatus, getClassLicenseManager, getContainer, getCustomTimer, getDataSource, getDataSources, getDisplayName, getExportCriteria, getExposeComponentConnections, getName, getOutPortNames, getPullFromServers, getPushData, getPushName, getPushToServers, getServerListData, getTimebase, getTrace, isActive, isScreenLocal, refreshCurrentValue, removeConnector, removeDataSource, removePropertyChangeListener, removeValueChangedListener, removeVetoableChangeListener, requestSyncWrite, setAutoSuspend, setClassLicenseManager, setContainer, setCustomTimer, setDataSourceName, setExportCriteria, setExposeComponentConnections, setName, setPullFromServers, setPushData, setPushName, setPushToServers, setScreenLocal, setServerListData, setTimebase, setTrace, setValueObject, tick, VIBEventaddVIBEventListener, checkScript, executeInScriptInternal, executeScript, executeScriptInternal, executeScriptInternal, getAutoSuspend, getBooleanValue, getBoolValue, getColorHi, getColorHiHi, getColorLo, getColorLoLo, getColorNormal, getConnectors, getConsoleLogger, getCurrentColor, getDataSourceName, getDoubleValue, getFloatValue, getGWTLogger, getIncomingValueObject, getInScript, getIntValue, getLongValue, getParent, getPopupLogger, getScript, getScriptEngine, getSendColors, getSources, getStringValue, getSyncWriteTimeout, getTimedPopupLogger, getTraceLogger, getValueHi, getValueHiHi, getValueLo, getValueLoLo, getValueObject, init, isHardSuspended, isRunning, isSendOnlyChangedValuesDefault, isSuspended, logException, logGWT, logGWT, logMessage, logTrace, n2sortConnectors, performScriptSubstitutions, popupMessage, post, removeConnector, removeVIBEventListener, replaceConnectors, scriptExtensionSubstition, setColorHi, setColorHiHi, setColorLo, setColorLoLo, setColorNormal, setConsoleLogger, setGWTLogger, setHardSuspended, setInScript, setParent, setPopupLogger, setScript, setSendColors, setSendOnlyChangedValuesDefault, setSyncWriteTimeout, setTimedPopupLogger, setTraceLogger, setValueHi, setValueHiHi, setValueLo, setValueLoLo, updateColor, updateListeners, updateListeners, updateListeners, whoAmIpublic static boolean alwaysCloseConnection
public static int debugLevel
public static final int HSQLDB
public java.text.DateFormat logDateFormat
public static final int MYSQL
public static final int ORACLE
public static final int OTHER
public static final int POSTGRES
public static final int SQLITE
public void connectionClosed(ConnectionClosedEvent cce)
connectionClosed in interface ConnectionClosedListenerpublic java.lang.String eventInfo(ValueChangedEvent e)
public java.lang.String getConnectionName()
public boolean getConsoleReport()
public int getDataBaseType()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.String getDateColumnName()
public java.lang.String getTableName()
public boolean isCreateIndex()
public boolean isCreateTable()
public boolean isMillisPrecision()
public boolean isSynchronizeConnection()
public void logInfo(java.lang.String msg)
public void messageString(java.lang.String msg)
public void setConnectionName(java.lang.String connectionName)
connectionName - The connectionName to set.public void setConsoleReport(boolean newValue)
public void setCreateIndex(boolean createIndex)
public void setCreateTable(boolean createTable)
createTable - The createTable to set.public void setDateColumnName(java.lang.String dateColumnName)
dateColumnName - The dateColumnName to set.public void setMillisPrecision(boolean millisPrecision)
public void setSimulationFlag(boolean simulationFlag)
setSimulationFlag in interface SimulationListenersimulationFlag - will be written as "false" when code is generated.public void setSynchronizeConnection(boolean synchronizeConnection)
synchronizeConnection - The synchronizeConnection to set.public void setTableName(java.lang.String tableName)
public void simulationStateChanged(SimulationChangedEvent simulationChangedEvent) throws java.lang.Exception
simulationStateChanged in interface SimulationListenerjava.lang.Exception - TODOpublic void start()
throws BadParameterException,
VIBUpdateFailedException
start in class SimpleDataSourceBadParameterExceptionVIBUpdateFailedExceptionpublic void stop()
throws BadParameterException
stop in class SimpleDataSourceBadParameterExceptionpublic boolean tableExists(java.lang.String tableName)
throws java.sql.SQLException
tableName - the table name to check forjava.sql.SQLException - thrown if the database cannot be contacted or other error.public java.lang.String toString()
toString in class ManipulatorCopyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.