public abstract class DBImporter extends DBImporterExporter
Constructor and Description |
---|
DBImporter() |
Modifier and Type | Method and Description |
---|---|
protected abstract java.sql.Connection |
connectToDB(DBStrings dbstrings)
Given a DBStrings it connects to the DB and returns the
java.sql.Connection object
|
java.lang.String |
findGroupTypeName(java.lang.String groupId,
java.sql.Connection conn)
Look up the group type name from the type ID in the database.
|
void |
importGroupsTree(MetaData metaData,
java.util.HashMap<java.lang.String,BibtexEntry> entries,
java.sql.Connection conn,
java.lang.String database_id) |
java.util.ArrayList<java.lang.Object[]> |
performImport(java.util.Set<java.lang.String> keySet,
DBStrings dbs,
java.util.List<java.lang.String> listOfDBs)
Worker method to perform the import from a database
|
protected abstract java.sql.ResultSet |
readColumnNames(java.sql.Connection conn) |
getDatabaseIDByName, removeAGivenDB, removeAllRecordsForAGivenDB, removeDB
protected abstract java.sql.Connection connectToDB(DBStrings dbstrings) throws java.lang.Exception
dbstrings
- The DBStrings to use to make the connectionjava.lang.Exception
protected abstract java.sql.ResultSet readColumnNames(java.sql.Connection conn) throws java.sql.SQLException
conn
- Connection object to the databasejava.sql.SQLException
public java.util.ArrayList<java.lang.Object[]> performImport(java.util.Set<java.lang.String> keySet, DBStrings dbs, java.util.List<java.lang.String> listOfDBs) throws java.lang.Exception
keySet
- The set of IDs of the entries to export.dbs
- The necessary database connection informationjava.lang.Exception
public java.lang.String findGroupTypeName(java.lang.String groupId, java.sql.Connection conn) throws java.sql.SQLException
groupId
- The database's groups idconn
- The database connectionjava.sql.SQLException
public void importGroupsTree(MetaData metaData, java.util.HashMap<java.lang.String,BibtexEntry> entries, java.sql.Connection conn, java.lang.String database_id) throws java.sql.SQLException
java.sql.SQLException