Package org.ehrbase.dao.access.jooq
Class AuditDetailsAccess
- java.lang.Object
-
- org.ehrbase.dao.access.support.DataAccess
-
- org.ehrbase.dao.access.jooq.AuditDetailsAccess
-
- All Implemented Interfaces:
I_AuditDetailsAccess,I_DomainAccess,I_SimpleCRUD
public class AuditDetailsAccess extends DataAccess implements I_AuditDetailsAccess
-
-
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
Constructors Constructor Description AuditDetailsAccess(I_DomainAccess dataAccess)AuditDetailsAccess(I_DomainAccess dataAccess, UUID systemId, UUID committer, I_ConceptAccess.ContributionChangeType changeType, String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UUIDcommit()storeComposition a new entry in the DB, using a default transaction time
only implemented with "root" tables: ehr, contribution and composition!UUIDcommit(Timestamp transactionTime)storeComposition a new entry in the DBUUIDcommit(UUID systemId, UUID committerId, String description)Convenience commit, that sets values on an empty/minimalAuditDetailsAccessbefore committing.Integerdelete()delete the Versioned Object associated with the instance implementing this Data Access Interface.com.nedap.archie.rm.generic.AuditDetailsgetAsAuditDetails()ContributionChangeTypegetChangeType()UUIDgetCommitter()DataAccessgetDataAccess()StringgetDescription()UUIDgetId()UUIDgetSystemId()TimestampgetTimeCommitted()StringgetTimeCommittedTzId()I_AuditDetailsAccessretrieveInstance(I_DomainAccess dataAccess, UUID auditId)Retrieve a specific audit instance via UUIDvoidsetChangeType(UUID changeType)voidsetChangeType(I_ConceptAccess.ContributionChangeType changeType)voidsetCommitter(UUID committer)voidsetDescription(String description)voidsetRecord(AuditDetailsRecord record)voidsetSystemId(UUID systemId)Booleanupdate()updateComposition the current entry using time now as the system transaction time
only implemented at root level object (contribution, composition, ehr).Booleanupdate(Boolean force)updateComposition the current entry using time now as the system transaction time
only implemented at root level object (contribution, composition, ehr).Booleanupdate(Timestamp transactionTime)updateComposition the current entry
depending on the implementation, records are updated only if one or more field(s) have been changedBooleanupdate(Timestamp transactionTime, boolean force)updateComposition 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.Booleanupdate(UUID systemId, UUID committer, I_ConceptAccess.ContributionChangeType changeType, String description)Update method with all optional parameters to only set and invoke update with given parameters.-
Methods inherited from class org.ehrbase.dao.access.support.DataAccess
getConnection, getContext, getDialect, getIntrospectService, getKnowledgeManager, getServerConfig, releaseConnection
-
-
-
-
Constructor Detail
-
AuditDetailsAccess
public AuditDetailsAccess(I_DomainAccess dataAccess)
-
AuditDetailsAccess
public AuditDetailsAccess(I_DomainAccess dataAccess, UUID systemId, UUID committer, I_ConceptAccess.ContributionChangeType changeType, String description)
-
-
Method Detail
-
retrieveInstance
public I_AuditDetailsAccess retrieveInstance(I_DomainAccess dataAccess, UUID auditId)
Description copied from interface:I_AuditDetailsAccessRetrieve a specific audit instance via UUID- Specified by:
retrieveInstancein interfaceI_AuditDetailsAccess- Parameters:
dataAccess- general data accessauditId- ID of audit to retrieve- Returns:
- access to instance
-
getDataAccess
public DataAccess getDataAccess()
- Specified by:
getDataAccessin interfaceI_DomainAccess
-
commit
public UUID commit(Timestamp transactionTime)
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
- Throws:
InternalServerException- when DB problem on storing the auditDetails
-
commit
public UUID 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
-
commit
public UUID commit(UUID systemId, UUID committerId, String description)
Description copied from interface:I_AuditDetailsAccessConvenience commit, that sets values on an empty/minimalAuditDetailsAccessbefore committing. Assumes creation as change type.- Specified by:
commitin interfaceI_AuditDetailsAccess- Parameters:
systemId- system on which this is initiatedcommitterId- committer ID (Party Identified)description- optional description- Returns:
- ID of created audit DB entry
-
update
public Boolean update(Timestamp transactionTime, boolean force)
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:
- Throws:
org.jooq.exception.DataAccessException- when query executing went wrongorg.jooq.exception.DataChangedException- on DB inconsistency
-
update
public Boolean update(Timestamp transactionTime)
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
public Boolean update(Boolean force)
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
public Boolean 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
public Boolean update(UUID systemId, UUID committer, I_ConceptAccess.ContributionChangeType changeType, String description)
Description copied from interface:I_AuditDetailsAccessUpdate method with all optional parameters to only set and invoke update with given parameters.- Specified by:
updatein interfaceI_AuditDetailsAccess- Parameters:
systemId- Optionalcommitter- Optional committer ID (Party Identified)changeType- Optional audit change type, indicating creation, modification and so ondescription- Optional- Returns:
- Indicating success of operation
-
delete
public Integer 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:
-
getId
public UUID getId()
- Specified by:
getIdin interfaceI_AuditDetailsAccess
-
setSystemId
public void setSystemId(UUID systemId)
- Specified by:
setSystemIdin interfaceI_AuditDetailsAccess
-
getSystemId
public UUID getSystemId()
- Specified by:
getSystemIdin interfaceI_AuditDetailsAccess
-
setCommitter
public void setCommitter(UUID committer)
- Specified by:
setCommitterin interfaceI_AuditDetailsAccess- Parameters:
committer- a Party Identified
-
getCommitter
public UUID getCommitter()
- Specified by:
getCommitterin interfaceI_AuditDetailsAccess
-
setChangeType
public void setChangeType(UUID changeType)
- Specified by:
setChangeTypein interfaceI_AuditDetailsAccess
-
setChangeType
public void setChangeType(I_ConceptAccess.ContributionChangeType changeType)
- Specified by:
setChangeTypein interfaceI_AuditDetailsAccess
-
getChangeType
public ContributionChangeType getChangeType()
- Specified by:
getChangeTypein interfaceI_AuditDetailsAccess
-
setDescription
public void setDescription(String description)
- Specified by:
setDescriptionin interfaceI_AuditDetailsAccess
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceI_AuditDetailsAccess
-
getTimeCommitted
public Timestamp getTimeCommitted()
- Specified by:
getTimeCommittedin interfaceI_AuditDetailsAccess
-
getTimeCommittedTzId
public String getTimeCommittedTzId()
- Specified by:
getTimeCommittedTzIdin interfaceI_AuditDetailsAccess
-
setRecord
public void setRecord(AuditDetailsRecord record)
- Specified by:
setRecordin interfaceI_AuditDetailsAccess
-
getAsAuditDetails
public com.nedap.archie.rm.generic.AuditDetails getAsAuditDetails()
- Specified by:
getAsAuditDetailsin interfaceI_AuditDetailsAccess
-
-