Package edu.suffolk.litlab.efsp.ecfcodes
Class CodeDatabaseAPI
java.lang.Object
edu.suffolk.litlab.efsp.db.Database
edu.suffolk.litlab.efsp.ecfcodes.CodeDatabaseAPI
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
CodeDatabase
ECF says that certain parts of the information model of the data that we exchange with the EFM is
contained in Genericode code lists. The EfileProxyServer saves those Genericode code lists in a
SQL database, for immediate use.
This class is the exposed interface between the SQL databases that store genericode info and the rest of the proxy server, particularly { CodeUpdater }. It should be instanianted once per jurisiction.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcreateTableIfAbsent(String tableName) abstract booleandeleteFromTable(String tableName) abstract booleandeleteFromTable(String tableName, String courtLocation) Deletes all entries in a domain from a table in the given table fromcourtLocation.Gets all court location identifiers (CLI) stored in the database.abstract TylerDomainThe domain (the juristiction + environment, e.g. illinois-stage) that this database is working over.Returns a map from court names to tables that needed to be updated for it.abstract voidupdateTable(String tableName, String courtName, InputStream is) abstract voidupdateTable(String tableName, String courtName, String newVersion, Iterator<Map<String, String>> rows) The iterator (rows) will be consumed by this function.abstract voidMethods inherited from class edu.suffolk.litlab.efsp.db.Database
close, commit, createTablesIfAbsent, rollback, setAutoCommit, setSavepoint
-
Constructor Details
-
CodeDatabaseAPI
-
-
Method Details
-
getDomain
The domain (the juristiction + environment, e.g. illinois-stage) that this database is working over. -
getAllLocations
Gets all court location identifiers (CLI) stored in the database.- Returns:
- a list of all valid CLIs for this jurisdiction
-
updateTable
public abstract void updateTable(String tableName, String courtName, InputStream is) throws SQLException, CodeDocException - Throws:
SQLExceptionCodeDocException
-
updateTable
public abstract void updateTable(String tableName, String courtName, String newVersion, Iterator<Map<String, String>> rows) throws SQLExceptionThe iterator (rows) will be consumed by this function.- Throws:
SQLException
-
deleteFromTable
- Throws:
SQLException
-
deleteFromTable
Deletes all entries in a domain from a table in the given table fromcourtLocation.- Throws:
SQLException
-
createTableIfAbsent
- Throws:
SQLException
-
getVersionsToUpdate
Returns a map from court names to tables that needed to be updated for it.- Throws:
SQLException
-
vacuumAll
public abstract void vacuumAll()
-