Class EraseResourceDAO
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.dao.impl.FHIRDbDAOImpl
-
- com.ibm.fhir.persistence.jdbc.dao.impl.ResourceDAOImpl
-
- com.ibm.fhir.persistence.jdbc.dao.EraseResourceDAO
-
- All Implemented Interfaces:
FHIRDbDAO,ResourceDAO
public class EraseResourceDAO extends ResourceDAOImpl
EraseDAO is the data access layer of the erase operation which executes directly against the database using SQL statements to:- check the resource exists
- delete all versions from the resource table
- delete all parameters
- delete entries from global table
- delete resource specific logical resource entry
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.ResourceDAOImpl
DEFAULT_VALUE_REINDEX_TSTAMP, IDX_DATA, IDX_IS_DELETED, IDX_LAST_UPDATED, IDX_LOGICAL_ID, IDX_LOGICAL_RESOURCE_ID, IDX_RESOURCE_ID, IDX_VERSION_ID
-
-
Constructor Summary
Constructors Constructor Description EraseResourceDAO(Connection conn, com.ibm.fhir.database.utils.api.IDatabaseTranslator translator, String schemaName, FHIRDbFlavor flavor, FHIRPersistenceJDBCCache cache, IResourceReferenceDAO rrd)Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteFromAllParametersTables(String tablePrefix, long logicalResourceId)Deletes from the Parametersvoiderase(com.ibm.fhir.persistence.ResourceEraseRecord eraseRecord, com.ibm.fhir.persistence.erase.EraseDTO eraseDto)processes the erasevoidrunInDao()Executes the SQL logic as part of the dao rather than via a stored procedure/function.-
Methods inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.ResourceDAOImpl
addResourceTypeCacheCandidate, checkIfNoneMatch, createDTO, deleteFromParameterTable, getCache, getResourceReferenceDAO, getResourceTypeIdFromCaches, getSearchByIdsSql, getTransactionData, history, historyCount, insert, read, readAllResourceTypeNames, readResourceTypeId, search, search, searchByIds, searchCount, searchCount, searchForIds, searchWholeSystem, setInt, setPersistenceContext, versionRead
-
Methods inherited from class com.ibm.fhir.persistence.jdbc.dao.impl.FHIRDbDAOImpl
buildExceptionWithIssue, buildFHIRPersistenceDBConnectException, cleanup, cleanup, createDTOs, getConnection, getFlavor, getSchemaName, getTranslator, isDb2Database, runCountQuery, runCountQuery, runQuery, runQuery, runQuery_STR_VALUES, severe, severe
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.fhir.persistence.jdbc.dao.api.FHIRDbDAO
getConnection, getFlavor, isDb2Database
-
-
-
-
Constructor Detail
-
EraseResourceDAO
public EraseResourceDAO(Connection conn, com.ibm.fhir.database.utils.api.IDatabaseTranslator translator, String schemaName, FHIRDbFlavor flavor, FHIRPersistenceJDBCCache cache, IResourceReferenceDAO rrd)
Public constructor- Parameters:
conn-translator-schemaName-flavor-cache-rrd-
-
-
Method Detail
-
runInDao
public void runInDao() throws SQLExceptionExecutes the SQL logic as part of the dao rather than via a stored procedure/function.- Throws:
SQLException
-
deleteFromAllParametersTables
public void deleteFromAllParametersTables(String tablePrefix, long logicalResourceId) throws SQLException
Deletes from the Parameters- Parameters:
tablePrefix-logicalResourceId-- Throws:
SQLException
-
-