public class DerbyAccess extends DatabaseAccess
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
DerbyAccess.IdentityStart |
DatabaseAccess.DatabaseType| Modifier and Type | Field and Description |
|---|---|
private org.apache.derby.jdbc.EmbeddedXADataSource40 |
dataSource |
private static double |
LARGEST_NEGATIVE |
private static double |
LARGEST_POSITIVE |
private org.apache.commons.logging.Log |
log |
private static double |
SMALLEST_NEGATIVE |
private static double |
SMALLEST_POSITIVE |
ctx| Constructor and Description |
|---|
DerbyAccess(javax.servlet.ServletContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
double |
applyBounds(double value) |
private void |
compressTable(com.serotonin.db.spring.ExtendedJdbcTemplate ejt,
java.lang.String tableName) |
void |
executeCompress(com.serotonin.db.spring.ExtendedJdbcTemplate ejt) |
java.io.File |
getDataDirectory() |
javax.sql.DataSource |
getDataSource() |
DatabaseAccess.DatabaseType |
getType() |
private java.lang.String |
getUrl(java.lang.String propertyPrefix) |
protected void |
initializeImpl(java.lang.String propertyPrefix) |
protected void |
initializeImpl(java.lang.String propertyPrefix,
java.lang.String dataSourceName) |
protected boolean |
newDatabaseCheck(com.serotonin.db.spring.ExtendedJdbcTemplate ejt) |
protected void |
postInitialize(com.serotonin.db.spring.ExtendedJdbcTemplate ejt) |
void |
runScript(java.lang.String[] script,
java.io.OutputStream out) |
void |
terminate() |
private void |
updateIndentityStarts(com.serotonin.db.spring.ExtendedJdbcTemplate ejt)
This method updates the tables with identity autoincrement values that are
the maximum of the current autoincrement value or max(id)+1.
|
createDatabaseAccess, doInConnection, getDatabaseAccess, getDatabasePassword, initialize, prepareStatementprivate final org.apache.commons.logging.Log log
private static final double LARGEST_POSITIVE
private static final double SMALLEST_POSITIVE
private static final double LARGEST_NEGATIVE
private static final double SMALLEST_NEGATIVE
private org.apache.derby.jdbc.EmbeddedXADataSource40 dataSource
public DatabaseAccess.DatabaseType getType()
getType in class DatabaseAccessprotected void initializeImpl(java.lang.String propertyPrefix)
initializeImpl in class DatabaseAccessprotected void initializeImpl(java.lang.String propertyPrefix,
java.lang.String dataSourceName)
initializeImpl in class DatabaseAccessprivate java.lang.String getUrl(java.lang.String propertyPrefix)
public void terminate()
terminate in class DatabaseAccesspublic javax.sql.DataSource getDataSource()
getDataSource in class DatabaseAccessprotected boolean newDatabaseCheck(com.serotonin.db.spring.ExtendedJdbcTemplate ejt)
newDatabaseCheck in class DatabaseAccessprotected void postInitialize(com.serotonin.db.spring.ExtendedJdbcTemplate ejt)
postInitialize in class DatabaseAccesspublic void runScript(java.lang.String[] script,
java.io.OutputStream out)
throws java.lang.Exception
runScript in class DatabaseAccessjava.lang.Exceptionpublic java.io.File getDataDirectory()
getDataDirectory in class DatabaseAccessprivate void updateIndentityStarts(com.serotonin.db.spring.ExtendedJdbcTemplate ejt)
public double applyBounds(double value)
applyBounds in class DatabaseAccesspublic void executeCompress(com.serotonin.db.spring.ExtendedJdbcTemplate ejt)
executeCompress in class DatabaseAccessprivate void compressTable(com.serotonin.db.spring.ExtendedJdbcTemplate ejt,
java.lang.String tableName)