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

public Class PostgreSQLProcessor

extends DBMSProcessor
Class Inheritance
Imports
java.sql.PreparedStatement, .ResultSet, .SQLException, .Statement, java.util.List, .Map, org.jabref.logic.shared.listener.PostgresSQLNotificationListener, org.jabref.logic.util.HeadlessExecutorService, org.jabref.model.entry.BibEntry, org.jabref.model.metadata.MetaData, org.postgresql.PGConnection

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

Field Summary

Modifier and TypeField and Description
private final int
private PostgresSQLNotificationListener
private int
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
bibEntries
)

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

Inserts the given List of BibEntry into the ENTRY 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:
checkBaseIntegritycheckTableAvailabilitydatabaseIsAtMostJabRef35getDBMSConnectionPropertiesgetProcessorInstancegetSharedEntriesgetSharedEntriesgetSharedEntrygetSharedIDVersionMappinggetSharedMetaDatainsertEntriesinsertEntryinsertIntoFieldTablepartitionAndGetSharedEntriesremoveEntriessetSharedMetaDatasetupSharedDatabaseupdateEntry

Field Detail

CURRENT_VERSION_DB_STRUCTback to summary
private final int CURRENT_VERSION_DB_STRUCT
listenerback to summary
private PostgresSQLNotificationListener listener
VERSION_DB_STRUCT_DEFAULTback to summary
private int VERSION_DB_STRUCT_DEFAULT

Constructor Detail

PostgreSQLProcessorback to summary
public PostgreSQLProcessor(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> bibEntries)

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
bibEntries:List<BibEntry>

List of 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:
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