Class CodeDatabase
java.lang.Object
edu.suffolk.litlab.efsp.db.Database
edu.suffolk.litlab.efsp.ecfcodes.CodeDatabaseAPI
edu.suffolk.litlab.efsp.ecfcodes.tyler.CodeDatabase
- All Implemented Interfaces:
AutoCloseable
The class that interfaces with the database tables that contain the Tyler case codes.
Codes in this case doesn't mean programming code", it's more like code numbers code names for all of the different case details and information.
- Author:
- brycew
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncourtCoverageCaseCategory(String searchTerm) courtCoverageCaseType(String searchTerm) courtCoverageFilingType(String searchTerm) Gets the courts that have a filing type that is matched by this search term.courtCoverageOptionalServices(String searchTerm) courtCoveragePartyType(String searchTerm) voidcreateIndicesIfAbsent(String tableName) voidcreateTableIfAbsent(String tableName) voidbooleandeleteFromTable(String tableName) booleandeleteFromTable(String tableName, String courtLocation) Deletes all entries in a domain from a table in the given table fromcourtLocation.static CodeDatabasefromDS(TylerDomain domain, DataSource ds) Gets all court location identifiers (CLI) stored in the database. updateTable should have been called on the `location` table before this works.getAllowedFileTypes(String courtId) getCaseCategoriesFor(String courtLocationId) getCaseCategoryWithCode(String courtLocationId, String caseCatCode) getCaseSubtypesFor(String courtLocationId, String caseType) getCaseTypesFor(String courtLocationId, String caseCategoryCode, Optional<Boolean> initial) getCaseTypeWith(String courtLocationId, String caseTypeCode) getCrossReference(String courtLocationId, String caseTypeId) getDamageAmount(String courtLocationId, String caseCategory) getDataField(String courtLocationId, String dataName) getDataFieldNames(String courtLocationId) getDataFields(String courtLocationId) gets all data fields if dataNames is empty, otherwise just those that match the code.getDisclaimerRequirements(String courtLocation) getDocumentTypes(String courtLocationId, String filingCodeId) The domain (the juristiction + environment, e.g. illinois-stage) that this database is working over.getFilableCaseCategories(String courtLocationId, Optional<Boolean> initial) getFilerTypes(String courtId) getFilingComponents(String courtLocationId, String filingCodeId) getFilingStatuses(String courtId) getFilingType(String courtLocationId, String categoryCode, String typeCode, boolean initial) getFilingTypeWith(String courtLocationId, String filingCode) getFullLocationInfo(String courtId) getLanguageNames(String courtLocationId) getLanguages(String courtLocationId) getMotionTypes(String courtLocationId, String filingCodeId) getNameSuffixes(String courtLocationId) getOptionalServices(String courtId, String filingCode) getOptionalServicesByCode(String courtId, String optServCode) getParentList(String courtId) Gets the full line of succession for a given court, so given "cook:dv6", this would return ["cook:dv6", "cook:dv", "cook", "1", "0"]getPartyTypeByCode(String courtLocationId, String partyTypeCode) getPartyTypeFor(String courtLocationId, String caseTypeCode) Gets the party types that are allowed for a given court and case type.getProcedureOrRemedy(String courtLocationId, String caseCategory) getServiceTypes(String courtLocationId) getStateCodes(String courtId, String country) Returns map of court locations to the list of tables they need to update.retrieveCaseCategoryByName(String categoryName) Get the code and court locations of the case categories that match the given name exactly.retrieveCaseTypeByName(String caseTypeName) Get the code and court locations of the case types that match the given name exactly.retrieveFilingTypeByName(String caseTypeName) Get the code and court locations of the filing types that match the given name exactly.retrieveOptionalServices(String optServName) retrievePartyType(String partyTypeName) searchCaseCategory(String searchTerm) Gets all distinct case category names that have the search term in them.searchCaseType(String searchTerm) Gets all distinct case type names that have the search term in them.searchFilingType(String searchTerm) Gets all distinct filing type names that have the search term in them.searchOptionalServices(String searchTerm) searchPartyType(String searchTerm) Gets all distinct filing type names that have the search term in them.booleanvoidupdateTable(String tableName, String courtName, InputStream inStream) voidupdateTable(String tableName, String courtName, String newVersion, Iterator<Map<String, String>> rows) The iterator (rows) will be consumed by this function.voidMethods inherited from class edu.suffolk.litlab.efsp.db.Database
close, commit, rollback, setAutoCommit, setSavepoint
-
Constructor Details
-
CodeDatabase
-
-
Method Details
-
fromDS
-
tablesExist
- Throws:
SQLException
-
createTablesIfAbsent
- Specified by:
createTablesIfAbsentin classDatabase- Throws:
SQLException
-
getDomain
Description copied from class:CodeDatabaseAPIThe domain (the juristiction + environment, e.g. illinois-stage) that this database is working over.- Specified by:
getDomainin classCodeDatabaseAPI
-
createTableIfAbsent
- Specified by:
createTableIfAbsentin classCodeDatabaseAPI- Throws:
SQLException
-
createIndicesIfAbsent
- Throws:
SQLException
-
updateTable
public void updateTable(String tableName, String courtName, InputStream inStream) throws SQLException, CodeDocException - Specified by:
updateTablein classCodeDatabaseAPI- Throws:
SQLExceptionCodeDocException
-
updateTable
public void updateTable(String tableName, String courtName, String newVersion, Iterator<Map<String, String>> rows) throws SQLExceptionDescription copied from class:CodeDatabaseAPIThe iterator (rows) will be consumed by this function.- Specified by:
updateTablein classCodeDatabaseAPI- Throws:
SQLException
-
searchCaseCategory
Gets all distinct case category names that have the search term in them.- Parameters:
searchTerm-- Returns:
-
courtCoverageCaseCategory
-
retrieveCaseCategoryByName
Get the code and court locations of the case categories that match the given name exactly.- Parameters:
categoryName-- Returns:
-
getCaseCategoriesFor
-
getFilableCaseCategories
public List<CaseCategory> getFilableCaseCategories(String courtLocationId, Optional<Boolean> initial) -
getCaseCategoryWithCode
-
searchCaseType
Gets all distinct case type names that have the search term in them.- Parameters:
searchTerm-- Returns:
-
courtCoverageCaseType
-
retrieveCaseTypeByName
Get the code and court locations of the case types that match the given name exactly.- Parameters:
caseTypeName-- Returns:
-
getCaseTypesFor
-
getCaseTypeWith
-
getCaseSubtypesFor
-
getDataField
-
getDataFieldNames
-
getDataFields
gets all data fields if dataNames is empty, otherwise just those that match the code. -
getProcedureOrRemedy
-
searchFilingType
Gets all distinct filing type names that have the search term in them.- Parameters:
searchTerm-- Returns:
-
courtCoverageFilingType
Gets the courts that have a filing type that is matched by this search term.- Parameters:
searchTerm-- Returns:
-
retrieveFilingTypeByName
Get the code and court locations of the filing types that match the given name exactly.- Parameters:
caseTypeName-- Returns:
-
getFilingType
public List<FilingCode> getFilingType(String courtLocationId, String categoryCode, String typeCode, boolean initial) -
getFilingTypeWith
-
vacuumAll
public void vacuumAll()- Specified by:
vacuumAllin classCodeDatabaseAPI
-
getDamageAmount
-
searchPartyType
Gets all distinct filing type names that have the search term in them.- Parameters:
searchTerm-- Returns:
-
courtCoveragePartyType
-
retrievePartyType
-
getPartyTypeFor
Gets the party types that are allowed for a given court and case type.- Parameters:
courtLocationId-caseTypeCode- Nullable, if null, gets all party types for court, otherwise, just for that case type.- Returns:
- a list of party types
-
getPartyTypeByCode
-
getCrossReference
-
getServiceTypes
-
getDocumentTypes
-
getMotionTypes
-
getNameSuffixes
-
getFilingComponents
-
getStateCodes
-
getAllowedFileTypes
-
getFilerTypes
-
getFilingStatuses
-
searchOptionalServices
-
courtCoverageOptionalServices
-
retrieveOptionalServices
-
getOptionalServicesByCode
-
getOptionalServices
-
getLanguageNames
-
getLanguages
-
getVersionsToUpdate
Returns map of court locations to the list of tables they need to update.- Specified by:
getVersionsToUpdatein classCodeDatabaseAPI- Throws:
SQLException
-
deleteFromTable
- Specified by:
deleteFromTablein classCodeDatabaseAPI- Throws:
SQLException
-
deleteFromTable
Description copied from class:CodeDatabaseAPIDeletes all entries in a domain from a table in the given table fromcourtLocation.- Specified by:
deleteFromTablein classCodeDatabaseAPI- Throws:
SQLException
-
getAllLocations
Gets all court location identifiers (CLI) stored in the database. updateTable should have been called on the `location` table before this works.- Specified by:
getAllLocationsin classCodeDatabaseAPI- Returns:
- a list of all valid CLIs for this jurisdiction
-
getLocationNames
-
getFileableLocations
-
getFileableLocationNames
-
getFullLocationInfo
-
getParentList
Gets the full line of succession for a given court, so given "cook:dv6", this would return ["cook:dv6", "cook:dv", "cook", "1", "0"] -
getDisclaimerRequirements
-