|
||||||||||
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
dk.netarkivet.harvester.datamodel.PostgreSQLSpecifics
public class PostgreSQLSpecifics
PostgreSQL-specific implementation of DB methods. Intended for PostgreSQL 8.3 and above. PostgreSQL does not support the CLOB datatype but instead provides a "text" data type. See http://www.postgresql.org/docs/current/static/datatype-character.html.
Field Summary | |
---|---|
(package private) org.apache.commons.logging.Log |
log
The log. |
Constructor Summary | |
---|---|
PostgreSQLSpecifics()
|
Method Summary | |
---|---|
boolean |
connectionIsValid(java.sql.Connection connection,
int validityTimeout)
Checks that the connection is valid (i.e. |
void |
createFrontierReportMonitorTable()
Create the frontierReportMonitor table in the database. |
protected void |
createGlobalCrawlerTrapExpressions()
Creates the initial (version 1) of table 'global_crawler_trap_expressions'. |
protected void |
createGlobalCrawlerTrapLists()
Creates the initial (version 1) of table 'global_crawler_trap_lists'. |
void |
createRunningJobsHistoryTable()
Create the frontierReportMonitor table in the database. |
void |
createRunningJobsMonitorTable()
Create the frontierReportMonitor table in the database. |
void |
dropJobConfigsTmpTable(java.sql.Connection c,
java.lang.String tableName)
Dispose of a temporary table created with getTemporaryTable. |
java.lang.String |
getDriverClassName()
Get the name of the JDBC driver class that handles interfacing to this server. |
static DBSpecifics |
getInstance()
Get an instance of the PostgreSQL specifics class. |
java.lang.String |
getJobConfigsTmpTable(java.sql.Connection c)
Get a temporary table for short-time use. |
java.lang.String |
getOrderByLimitAndOffsetSubClause(long limit,
long offset)
Formats the LIMIT sub-clause of an SQL order clause. |
protected void |
migrateConfigurationsv3ov4()
Migrates the 'configurations' table from version 3 to version 4. |
protected void |
migrateFullharvestsv2tov3()
Migrates the 'fullharvests' table from version 2 to version 3. |
protected 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 void |
migrateJobsv4tov5()
Migrates the 'jobs' table from version 4 to version 5 consisting of adding new fields 'resubmitted_as_job' and 'submittedDate'. |
boolean |
supportsClob()
Returns true if the target RDBMS supports CLOBs. |
Methods inherited from class dk.netarkivet.harvester.datamodel.DBSpecifics |
---|
updateTable |
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 PostgreSQLSpecifics()
Method Detail |
---|
public static DBSpecifics getInstance()
public java.lang.String getJobConfigsTmpTable(java.sql.Connection c) throws java.sql.SQLException
getJobConfigsTmpTable
in class DBSpecifics
c
- The DB connection to use.
java.sql.SQLException
- if there is a problem getting the table.public void dropJobConfigsTmpTable(java.sql.Connection c, java.lang.String tableName)
dropJobConfigsTmpTable
in class DBSpecifics
c
- The DB connection to use.tableName
- The name of the temporary tablepublic java.lang.String getDriverClassName()
getDriverClassName
in class DBSpecifics
public boolean connectionIsValid(java.sql.Connection connection, int validityTimeout)
DBSpecifics
Connection.isValid(int)
JDBC4 method properly.
connectionIsValid
in class DBSpecifics
connection
- the connection to checkvalidityTimeout
- the time in seconds to wait for the database operation used to
validate the connection to complete. If the timeout period
expires before the operation completes, this method returns
false.
Connection.isValid(int)
public java.lang.String getOrderByLimitAndOffsetSubClause(long limit, long offset)
DBSpecifics
getOrderByLimitAndOffsetSubClause
in class DBSpecifics
limit
- the maximum number of rows to fetch.offset
- the starting offset in the full query results.
public boolean supportsClob()
DBSpecifics
supportsClob
in class DBSpecifics
protected void migrateJobsv3tov4()
migrateJobsv3tov4
in class DBSpecifics
IOFailure
- in case of problems in interacting with the databaseprotected void migrateJobsv4tov5()
migrateJobsv4tov5
in class DBSpecifics
IOFailure
- in case of problems in interacting with the databaseprotected void migrateConfigurationsv3ov4()
migrateConfigurationsv3ov4
in class DBSpecifics
protected void migrateFullharvestsv2tov3()
migrateFullharvestsv2tov3
in class DBSpecifics
protected void createGlobalCrawlerTrapExpressions()
DBSpecifics
createGlobalCrawlerTrapExpressions
in class DBSpecifics
protected void createGlobalCrawlerTrapLists()
DBSpecifics
createGlobalCrawlerTrapLists
in class DBSpecifics
public void createFrontierReportMonitorTable()
DBSpecifics
createFrontierReportMonitorTable
in class DBSpecifics
public void createRunningJobsHistoryTable()
DBSpecifics
createRunningJobsHistoryTable
in class DBSpecifics
public void createRunningJobsMonitorTable()
DBSpecifics
createRunningJobsMonitorTable
in class DBSpecifics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |