Top Description Fields Constructors Methods
org.jabref.logic.shared

public Class OracleProcessor

extends DBMSProcessor
Class Inheritance
Imports
java.sql.PreparedStatement, .ResultSet, .SQLException, .Statement, java.util.ArrayList, .List, .Map, .Properties, java.util.stream.Collectors, org.jabref.logic.shared.listener.OracleNotificationListener, org.jabref.model.entry.BibEntry, org.jabref.model.entry.field.Field, org.jabref.model.metadata.MetaData, oracle.jdbc.OracleConnection, oracle.jdbc.OracleStatement, oracle.jdbc.dcn.DatabaseChangeRegistration

Processes all incoming or outgoing bib data to Oracle database and manages its structure.

Field Summary

Modifier and TypeField and Description
private Integer
private oracle.jdbc.dcn.DatabaseChangeRegistration
private OracleNotificationListener
private oracle.jdbc.OracleConnection
private Integer
Inherited from org.jabref.logic.shared.DBMSProcessor:
connectionconnectionPropertiesLOGGERPROCESSOR_ID

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv String
escape(String
Table or field name
expression
)

Implements abstract org.jabref.logic.shared.DBMSProcessor.escape.

Escapes parts of SQL expressions such as a table name or a field name to match the conventions of the database system using the current dbmsType.

pack-priv String
pack-priv Integer
protected void
insertIntoEntryTable(List<BibEntry>
List of BibEntry to be inserted
entries
)

Overrides org.jabref.logic.shared.DBMSProcessor.insertIntoEntryTable.

Inserts the given List of BibEntry into the ENTRY table.

protected void
insertIntoFieldTable(List<BibEntry>
BibEntry to be inserted
bibEntries
)

Overrides org.jabref.logic.shared.DBMSProcessor.insertIntoFieldTable.

Inserts the given list of BibEntry into FIELD table.

public void
notifyClients()

Overrides org.jabref.logic.shared.DBMSProcessor.notifyClients.

Notifies all clients (DBMSSynchronizer) which are connected to the same DBMS.

public void
setUp()

Implements abstract org.jabref.logic.shared.DBMSProcessor.setUp.

Creates and sets up the needed tables and columns according to the database type.

public void
startNotificationListener(DBMSSynchronizer
DBMSSynchronizer which handles the notification.
dbmsSynchronizer
)

Overrides org.jabref.logic.shared.DBMSProcessor.startNotificationListener.

Listens for notifications from DBMS.

public void
Inherited from org.jabref.logic.shared.DBMSProcessor:
checkBaseIntegritycheckTableAvailabilitydatabaseIsAtMostJabRef35getDBMSConnectionPropertiesgetProcessorInstancegetSharedEntriesgetSharedEntriesgetSharedEntrygetSharedIDVersionMappinggetSharedMetaDatainsertEntriesinsertEntrypartitionAndGetSharedEntriesremoveEntriessetSharedMetaDatasetupSharedDatabaseupdateEntry

Field Detail

CURRENT_VERSION_DB_STRUCTback to summary
private Integer CURRENT_VERSION_DB_STRUCT
databaseChangeRegistrationback to summary
private oracle.jdbc.dcn.DatabaseChangeRegistration databaseChangeRegistration
listenerback to summary
private OracleNotificationListener listener
oracleConnectionback to summary
private oracle.jdbc.OracleConnection oracleConnection
VERSION_DB_STRUCT_DEFAULTback to summary
private Integer VERSION_DB_STRUCT_DEFAULT

Constructor Detail

OracleProcessorback to summary
public OracleProcessor(DatabaseConnection connection)

Method Detail

escapeback to summary
pack-priv String escape(String expression)

Implements abstract org.jabref.logic.shared.DBMSProcessor.escape.

Doc from org.jabref.logic.shared.DBMSProcessor.escape.

Escapes parts of SQL expressions such as a table name or a field name to match the conventions of the database system using the current dbmsType.

This method is package private, because of DBMSProcessorTest

Parameters
expression:String

Table or field name

Returns:String

Correctly escaped expression

Annotations
@Override
escape_Tableback to summary
pack-priv String escape_Table(String expression)

Implements abstract org.jabref.logic.shared.DBMSProcessor.escape_Table.

Annotations
@Override
getCURRENT_VERSION_DB_STRUCTback to summary
pack-priv Integer getCURRENT_VERSION_DB_STRUCT()

Implements abstract org.jabref.logic.shared.DBMSProcessor.getCURRENT_VERSION_DB_STRUCT.

Annotations
@Override
insertIntoEntryTableback to summary
protected void insertIntoEntryTable(List<BibEntry> entries)

Overrides org.jabref.logic.shared.DBMSProcessor.insertIntoEntryTable.

Doc from org.jabref.logic.shared.DBMSProcessor.insertIntoEntryTable.

Inserts the given List of BibEntry into the ENTRY table.

Parameters
entries:List<BibEntry>

List of BibEntry to be inserted

Annotations
@Override
insertIntoFieldTableback to summary
protected void insertIntoFieldTable(List<BibEntry> bibEntries)

Overrides org.jabref.logic.shared.DBMSProcessor.insertIntoFieldTable.

Doc from org.jabref.logic.shared.DBMSProcessor.insertIntoFieldTable.

Inserts the given list of BibEntry into FIELD table.

Parameters
bibEntries:List<BibEntry>

BibEntry to be inserted

Annotations
@Override
notifyClientsback to summary
public void notifyClients()

Overrides org.jabref.logic.shared.DBMSProcessor.notifyClients.

Doc from org.jabref.logic.shared.DBMSProcessor.notifyClients.

Notifies all clients (DBMSSynchronizer) which are connected to the same DBMS. Needs to be implemented if LiveUpdate is supported by the DBMS

Annotations
@Override
setUpback to summary
public void setUp() throws SQLException

Implements abstract org.jabref.logic.shared.DBMSProcessor.setUp.

Creates and sets up the needed tables and columns according to the database type.

Annotations
@Override
Exceptions
SQLException:

Doc from org.jabref.logic.shared.DBMSProcessor.setUp.

in case of error

startNotificationListenerback to summary
public void startNotificationListener(DBMSSynchronizer dbmsSynchronizer)

Overrides org.jabref.logic.shared.DBMSProcessor.startNotificationListener.

Doc from org.jabref.logic.shared.DBMSProcessor.startNotificationListener.

Listens for notifications from DBMS. Needs to be implemented if LiveUpdate is supported by the DBMS

Parameters
dbmsSynchronizer:DBMSSynchronizer

DBMSSynchronizer which handles the notification.

Annotations
@Override
stopNotificationListenerback to summary
public void stopNotificationListener()

Overrides org.jabref.logic.shared.DBMSProcessor.stopNotificationListener.

Doc from org.jabref.logic.shared.DBMSProcessor.stopNotificationListener.

Terminates the notification listener. Needs to be implemented if LiveUpdate is supported by the DBMS

Annotations
@Override