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, prepareStatement
private 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 DatabaseAccess
protected void initializeImpl(java.lang.String propertyPrefix)
initializeImpl
in class DatabaseAccess
protected void initializeImpl(java.lang.String propertyPrefix, java.lang.String dataSourceName)
initializeImpl
in class DatabaseAccess
private java.lang.String getUrl(java.lang.String propertyPrefix)
public void terminate()
terminate
in class DatabaseAccess
public javax.sql.DataSource getDataSource()
getDataSource
in class DatabaseAccess
protected boolean newDatabaseCheck(com.serotonin.db.spring.ExtendedJdbcTemplate ejt)
newDatabaseCheck
in class DatabaseAccess
protected void postInitialize(com.serotonin.db.spring.ExtendedJdbcTemplate ejt)
postInitialize
in class DatabaseAccess
public void runScript(java.lang.String[] script, java.io.OutputStream out) throws java.lang.Exception
runScript
in class DatabaseAccess
java.lang.Exception
public java.io.File getDataDirectory()
getDataDirectory
in class DatabaseAccess
private void updateIndentityStarts(com.serotonin.db.spring.ExtendedJdbcTemplate ejt)
public double applyBounds(double value)
applyBounds
in class DatabaseAccess
public void executeCompress(com.serotonin.db.spring.ExtendedJdbcTemplate ejt)
executeCompress
in class DatabaseAccess
private void compressTable(com.serotonin.db.spring.ExtendedJdbcTemplate ejt, java.lang.String tableName)