| Modifier and Type | Field and Description |
|---|---|
| protected final Connection | |
| protected DatabaseConnectionProperties | |
| protected static final Logger | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the structure matches the requirements, false if not.Scans the database for required tables. |
| protected boolean | Returns: true if all given tables are present, else false.Table names to be checked tableNames)Checks whether all given table names (case insensitive) exist in database. |
| public boolean | Returns: true if the structure is old, else false.Determines whether the database is using an pre-3.6 structure. |
| pack-priv abstract String | |
| pack-priv abstract String | |
| pack-priv abstract Integer | |
| public DatabaseConnectionProperties | |
| private List | Returns: true if existent, else falseBibEntry to be checkedFilters a list of BibEntry to and returns those which do not exist in the database |
| public static DBMSProcessor | getProcessorInstance(DatabaseConnection connection)
Returns a new instance of the abstract type |
| public List | getSharedEntries(List<Integer>
the list of Ids to filter. If list is empty, then no filter is applied sharedIDs)Queries the database for shared entries. |
| public List | |
| public Optional | |
| public Map | |
| public Map | |
| public void | insertEntries(List<BibEntry>
List of bibEntries)BibEntry to be insertedInserts the List of BibEntry into the shared database. |
| public void | |
| protected void | insertIntoEntryTable(List<BibEntry>
List of bibEntries)BibEntry to be insertedInserts the given List of BibEntry into the ENTRY table. |
| protected void | insertIntoFieldTable(List<BibEntry>
BibEntry to be insertedInserts the given list of BibEntry into FIELD table. |
| private void | |
| public void | |
| public List | partitionAndGetSharedEntries(List<Integer>
the list of Ids to filter. If list is empty, then no filter is applied sharedIDs)Queries the database for shared entries in 500 element batches. |
| public void | |
| private void | |
| public void | setSharedMetaData(Map<String, String>
JabRef meta data as map data)Clears and sets all shared meta data. |
| protected abstract void | |
| public void | setupSharedDatabase()
Creates and sets up the needed tables and columns according to the database type and performs a check whether the needed tables are present. |
| public void | startNotificationListener(DBMSSynchronizer
DBMSSynchronizer which handles the notification.Listens for notifications from DBMS. |
| public void | |
| public void | updateEntry(BibEntry
BibEntry affected by changesUpdates the whole |
| connection | back to summary |
|---|---|
| protected final Connection connection | |
| connectionProperties | back to summary |
|---|---|
| protected DatabaseConnectionProperties connectionProperties | |
| LOGGER | back to summary |
|---|---|
| protected static final Logger LOGGER | |
| PROCESSOR_ID | back to summary |
|---|---|
| public static final String PROCESSOR_ID | |
| DBMSProcessor | back to summary |
|---|---|
| protected DBMSProcessor(DatabaseConnection dbmsConnection) | |
| checkBaseIntegrity | back to summary |
|---|---|
| public boolean checkBaseIntegrity() throws SQLException Scans the database for required tables.
| |
| checkTableAvailability | back to summary |
|---|---|
| protected boolean checkTableAvailability(String... tableNames) throws SQLException Checks whether all given table names (case insensitive) exist in database.
| |
| databaseIsAtMostJabRef35 | back to summary |
|---|---|
| public boolean databaseIsAtMostJabRef35() throws SQLException Determines whether the database is using an pre-3.6 structure.
| |
| escape | back to summary |
|---|---|
| pack-priv abstract String escape(String expression) 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 | |
| escape_Table | back to summary |
|---|---|
| pack-priv abstract String escape_Table(String expression) | |
| getCURRENT_VERSION_DB_STRUCT | back to summary |
|---|---|
| pack-priv abstract Integer getCURRENT_VERSION_DB_STRUCT() | |
| getDBMSConnectionProperties | back to summary |
|---|---|
| public DatabaseConnectionProperties getDBMSConnectionProperties() | |
| getNotYetExistingEntries | back to summary |
|---|---|
| private List Filters a list of BibEntry to and returns those which do not exist in the database | |
| getProcessorInstance | back to summary |
|---|---|
| public static DBMSProcessor getProcessorInstance(DatabaseConnection connection) Returns a new instance of the abstract type | |
| getSharedEntries | back to summary |
|---|---|
| public List Queries the database for shared entries. Optionally, they are filtered by the given list of sharedIds | |
| getSharedEntries | back to summary |
|---|---|
| public List | |
| getSharedEntry | back to summary |
|---|---|
| public Optional | |
| getSharedIDVersionMapping | back to summary |
|---|---|
| public Map Retrieves a mapping between the columns SHARED_ID and VERSION. | |
| getSharedMetaData | back to summary |
|---|---|
| public Map Fetches and returns all shared meta data. | |
| insertEntries | back to summary |
|---|---|
| public void insertEntries(List<BibEntry> bibEntries) Inserts the List of BibEntry into the shared database. | |
| insertEntry | back to summary |
|---|---|
| public void insertEntry(BibEntry bibEntry) For use in test only. Inserts the BibEntry into the shared database. | |
| insertIntoEntryTable | back to summary |
|---|---|
| protected void insertIntoEntryTable(List<BibEntry> bibEntries) Inserts the given List of BibEntry into the ENTRY table. | |
| insertIntoFieldTable | back to summary |
|---|---|
| protected void insertIntoFieldTable(List<BibEntry> bibEntries) Inserts the given list of BibEntry into FIELD table. | |
| insertOrUpdateFields | back to summary |
|---|---|
| private void insertOrUpdateFields(BibEntry localBibEntry) throws SQLException Helping method. Inserts a key-value pair into FIELD table for every field if not existing. Otherwise only an update is performed. | |
| notifyClients | back to summary |
|---|---|
| public void notifyClients() Notifies all clients ( | |
| partitionAndGetSharedEntries | back to summary |
|---|---|
| public List Queries the database for shared entries in 500 element batches. Optionally, they are filtered by the given list of sharedIds | |
| removeEntries | back to summary |
|---|---|
| public void removeEntries(List<BibEntry> bibEntries) Removes the shared bibEntry. | |
| removeSharedFieldsByDifference | back to summary |
|---|---|
| private void removeSharedFieldsByDifference(BibEntry localBibEntry, BibEntry sharedBibEntry) throws SQLException Helping method. Removes shared fields which do not exist locally | |
| setSharedMetaData | back to summary |
|---|---|
| public void setSharedMetaData(Map<String, String> data) throws SQLException Clears and sets all shared meta data. | |
| setUp | back to summary |
|---|---|
| protected abstract void setUp() throws SQLException Creates and sets up the needed tables and columns according to the database type.
| |
| setupSharedDatabase | back to summary |
|---|---|
| public void setupSharedDatabase() throws SQLException Creates and sets up the needed tables and columns according to the database type and performs a check whether the needed tables are present.
| |
| startNotificationListener | back to summary |
|---|---|
| public void startNotificationListener(DBMSSynchronizer dbmsSynchronizer) Listens for notifications from DBMS. Needs to be implemented if LiveUpdate is supported by the DBMS
| |
| stopNotificationListener | back to summary |
|---|---|
| public void stopNotificationListener() Terminates the notification listener. Needs to be implemented if LiveUpdate is supported by the DBMS | |
| updateEntry | back to summary |
|---|---|
| public void updateEntry(BibEntry localBibEntry) throws OfflineLockException, SQLException Updates the whole
| |