Package org.ehrbase.dao.access.jooq
Class CompositionHistoryAccess
java.lang.Object
org.ehrbase.dao.access.support.DataAccess
org.ehrbase.dao.access.jooq.CompositionHistoryAccess
- All Implemented Interfaces:
I_Compensatable,I_CompositionHistoryAccess,I_DomainAccess,I_SimpleCRUD
Stripped down DAO to perform some `*_history` table related actions. Composition access handling in general is
done through the
CompositionAccess class.-
Field Summary
Fields inherited from interface org.ehrbase.dao.access.interfaces.I_DomainAccess
DBCP2_POOL, KEY_AUTO_RECONNECT, KEY_CONNECTION_MODE, KEY_DATABASE, KEY_DIALECT, KEY_HOST, KEY_INITIAL_CONNECTIONS, KEY_INTROSPECT_CACHE, KEY_KNOWLEDGE, KEY_LOG_ABANDONNED, KEY_LOGIN, KEY_MAX_ACTIVE, KEY_MAX_CONNECTION, KEY_MAX_IDLE, KEY_PASSWORD, KEY_PORT, KEY_REMOVE_ABANDONNED, KEY_REMOVE_ABANDONNED_TIMEOUT, KEY_SCHEMA, KEY_SET_MAX_PREPARED_STATEMENTS, KEY_SET_POOL_PREPARED_STATEMENTS, KEY_TEST_ON_BORROW, KEY_URL, KEY_WAIT_MS, PG_POOL -
Constructor Summary
ConstructorsConstructorDescriptionCompositionHistoryAccess(I_DomainAccess domainAccess, String tenantIdentifier) -
Method Summary
Modifier and TypeMethodDescriptioncommit()storeComposition a new entry in the DB, using a default transaction time
only implemented with "root" tables: ehr, contribution and composition!storeComposition a new entry in the DBdelete()delete the Versioned Object associated with the instance implementing this Data Access Interface.getId()static I_CompositionHistoryAccessretrieveByVersion(I_DomainAccess domainAccess, UUID compositionId, int version) static I_CompositionHistoryAccessretrieveLatest(I_DomainAccess domainAccess, UUID compositionId) Creates DAO object with the latest existing history record matching the given composition ID.voidsetHasAudit(UUID audit) voidsetInContribution(UUID contribution) voidsetRecord(CompositionHistoryRecord record) update()updateComposition the current entry using time now as the system transaction time
only implemented at root level object (contribution, composition, ehr).updateComposition the current entry using time now as the system transaction time
only implemented at root level object (contribution, composition, ehr).updateComposition the current entry
depending on the implementation, records are updated only if one or more field(s) have been changedupdateComposition the current entry even if the record is not modified
intended to be used with temporal tables to ensure that a set of interdependent tables are updated in sync.Methods inherited from class org.ehrbase.dao.access.support.DataAccess
getConnection, getContext, getDialect, getIntrospectService, getKnowledgeManager, getServerConfig, releaseConnection
-
Constructor Details
-
CompositionHistoryAccess
-
-
Method Details
-
getDataAccess
- Specified by:
getDataAccessin interfaceI_DomainAccess
-
commit
Description copied from interface:I_SimpleCRUDstoreComposition a new entry in the DB- Specified by:
commitin interfaceI_SimpleCRUD- Returns:
- the UUID of the newly created record
-
commit
Description copied from interface:I_SimpleCRUDstoreComposition a new entry in the DB, using a default transaction time
only implemented with "root" tables: ehr, contribution and composition!- Specified by:
commitin interfaceI_SimpleCRUD- Returns:
- the UUID of the newly created record
-
update
Description copied from interface:I_SimpleCRUDupdateComposition the current entry
depending on the implementation, records are updated only if one or more field(s) have been changed- Specified by:
updatein interfaceI_SimpleCRUD- Returns:
-
update
Description copied from interface:I_SimpleCRUDupdateComposition the current entry even if the record is not modified
intended to be used with temporal tables to ensure that a set of interdependent tables are updated in sync. This approach is used to simplify versions retrieval.- Specified by:
updatein interfaceI_SimpleCRUD- Returns:
-
update
Description copied from interface:I_SimpleCRUDupdateComposition the current entry using time now as the system transaction time
only implemented at root level object (contribution, composition, ehr). depending on the implementation, records are updated only if one or more field(s) have been changed- Specified by:
updatein interfaceI_SimpleCRUD- Returns:
-
update
Description copied from interface:I_SimpleCRUDupdateComposition the current entry using time now as the system transaction time
only implemented at root level object (contribution, composition, ehr). depending on the implementation, records are updated only if one or more field(s) have been changed- Specified by:
updatein interfaceI_SimpleCRUD- Returns:
-
delete
Description copied from interface:I_SimpleCRUDdelete the Versioned Object associated with the instance implementing this Data Access Interface. Relies on ON DELETE CASCADE- Specified by:
deletein interfaceI_SimpleCRUD- Returns:
-
retrieveByVersion
public static I_CompositionHistoryAccess retrieveByVersion(I_DomainAccess domainAccess, UUID compositionId, int version) -
retrieveLatest
public static I_CompositionHistoryAccess retrieveLatest(I_DomainAccess domainAccess, UUID compositionId) Description copied from interface:I_CompositionHistoryAccessCreates DAO object with the latest existing history record matching the given composition ID.- Parameters:
domainAccess- ConfigcompositionId- Composition ID- Returns:
- DAO instance or null if no history is available
-
setRecord
- Specified by:
setRecordin interfaceI_CompositionHistoryAccess
-
getRecord
- Specified by:
getRecordin interfaceI_CompositionHistoryAccess
-
setInContribution
- Specified by:
setInContributionin interfaceI_CompositionHistoryAccess
-
setHasAudit
- Specified by:
setHasAuditin interfaceI_CompositionHistoryAccess
-
getSysTransaction
- Specified by:
getSysTransactionin interfaceI_Compensatable
-
getContributionId
- Specified by:
getContributionIdin interfaceI_Compensatable
-
getId
- Specified by:
getIdin interfaceI_Compensatable
-