|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.utils.SettingsFactory<DBSpecifics>
dk.netarkivet.harvester.datamodel.DBSpecifics
public abstract class DBSpecifics
Defines database specific implementations used by the Harvester.
The actual actual implementation which is loaded is defined by the
CommonSettings.DB_SPECIFICS_CLASS
setting. See the sub class list for
available implementations
Field Summary | |
---|---|
(package private) org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
DBSpecifics()
|
Method Summary | |
---|---|
protected abstract void |
createExtendedFieldTable()
Create the extendedfield table in the database. |
protected abstract void |
createExtendedFieldTypeTable()
Create the extendedfieldtype table in the database. |
protected abstract void |
createExtendedFieldValueTable()
Create the extendedfieldvalue table in the database. |
abstract void |
createFrontierReportMonitorTable()
Create the frontierReportMonitor table in the database. |
protected abstract void |
createGlobalCrawlerTrapExpressions()
Creates the initial (version 1) of table 'global_crawler_trap_expressions'. |
protected abstract void |
createGlobalCrawlerTrapLists()
Creates the initial (version 1) of table 'global_crawler_trap_lists'. |
abstract void |
createRunningJobsHistoryTable()
Create the frontierReportMonitor table in the database. |
abstract void |
createRunningJobsMonitorTable()
Create the frontierReportMonitor table in the database. |
abstract void |
dropJobConfigsTmpTable(java.sql.Connection c,
java.lang.String tableName)
Dispose of a temporary table gotten with getTemporaryTable. |
abstract java.lang.String |
getDriverClassName()
Get the name of the JDBC driver class that handles interfacing to this server. |
static DBSpecifics |
getInstance()
Get the singleton instance of the DBSpecifics implementation class. |
abstract java.lang.String |
getJobConfigsTmpTable(java.sql.Connection c)
Get a temporary table for short-time use. |
abstract java.lang.String |
getOrderByLimitAndOffsetSubClause(long limit,
long offset)
Formats the LIMIT sub-clause of an SQL order clause. |
protected abstract void |
migrateConfigurationsv3ov4()
Migrates the 'configurations' table from version 3 to version 4. |
protected abstract void |
migrateConfigurationsv4tov5()
Migrates the 'configurations' table from version 4 to version 5. |
protected abstract void |
migrateFullharvestsv2tov3()
Migrates the 'fullharvests' table from version 2 to version 3. |
protected abstract void |
migrateFullharvestsv3tov4()
Migrates the 'fullharvests' table from version 3 to version 4. |
protected abstract void |
migrateFullharvestsv4tov5()
Migrates the 'fullharvests' table from version 4 to version 5. |
protected abstract void |
migrateJobsv3tov4()
Migrates the 'jobs' table from version 3 to version 4 consisting of a change of the field forcemaxbytes from int to bigint and setting its default to -1. |
protected abstract void |
migrateJobsv4tov5()
Migrates the 'jobs' table from version 4 to version 5 consisting of adding new fields 'resubmitted_as_job' and 'submittedDate'. |
protected abstract void |
migrateJobsv5tov6()
Migrates the 'jobs' table from version 5 to version 6. |
protected abstract void |
migrateJobsv6tov7()
Migrates the 'jobs' table from version 6 to version 7 consisting of adding the bigint fieldcontinuationof with null as default |
protected abstract void |
migrateRunningJobsHistoryTableV1ToV2()
Migrates the 'runningjobshistory' table from version 1 to version 2. |
protected abstract void |
migrateRunningJobsMonitorTableV1ToV2()
Migrates the 'runningjobsmonitor' table from version 1 to version 2. |
abstract boolean |
supportsClob()
Returns true if the target RDBMS supports CLOBs. |
void |
updateTable(java.lang.String tableName,
int toVersion)
Update a table to a newer version, if necessary. |
void |
updateTables()
Update all tables in the enum class HarvesterDatabaseTables to the required
version. |
Methods inherited from class dk.netarkivet.common.utils.SettingsFactory |
---|
getInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
org.apache.commons.logging.Log log
Constructor Detail |
---|
public DBSpecifics()
Method Detail |
---|
public static DBSpecifics getInstance()
public abstract java.lang.String getJobConfigsTmpTable(java.sql.Connection c) throws java.sql.SQLException
c
- The DB connection to use.
java.sql.SQLException
- if there is a problem getting the table.public abstract void dropJobConfigsTmpTable(java.sql.Connection c, java.lang.String tableName)
c
- The DB connection to use.tableName
- The name of the temporarily created table.public abstract java.lang.String getDriverClassName()
public void updateTable(java.lang.String tableName, int toVersion)
tableName
- The table to updatetoVersion
- The version to update the table to.
IllegalState
- If the table is an unsupported version, and the toVersion is
less than the current version of the table
NotImplementedException
- If no method exists for migration from current version of the
table to the toVersion of the table.
IOFailure
- in case of problems in interacting with the databaseprotected abstract void migrateJobsv3tov4()
IOFailure
- in case of problems in interacting with the databaseprotected abstract void migrateJobsv4tov5()
IOFailure
- in case of problems in interacting with the databaseprotected abstract void migrateConfigurationsv3ov4()
protected abstract void migrateFullharvestsv2tov3()
protected abstract void migrateRunningJobsHistoryTableV1ToV2()
protected abstract void migrateRunningJobsMonitorTableV1ToV2()
protected abstract void createGlobalCrawlerTrapLists()
protected abstract void createGlobalCrawlerTrapExpressions()
public abstract java.lang.String getOrderByLimitAndOffsetSubClause(long limit, long offset)
limit
- the maximum number of rows to fetch.offset
- the starting offset in the full query results.
public abstract boolean supportsClob()
public abstract void createFrontierReportMonitorTable()
public abstract void createRunningJobsHistoryTable()
public abstract void createRunningJobsMonitorTable()
protected abstract void migrateJobsv5tov6()
IOFailure
- in case of problems in interacting with the databaseprotected abstract void migrateConfigurationsv4tov5()
protected abstract void migrateFullharvestsv3tov4()
protected abstract void migrateFullharvestsv4tov5()
protected abstract void createExtendedFieldTypeTable()
protected abstract void createExtendedFieldTable()
protected abstract void createExtendedFieldValueTable()
protected abstract void migrateJobsv6tov7()
public void updateTables()
HarvesterDatabaseTables
to the required
version. There is no attempt to undo the update.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |