Interface I_ContributionAccess
- All Superinterfaces:
I_SimpleCRUD
- All Known Implementing Classes:
ContributionAccess
Access layer to Contributions
Created by Christian Chevalley on 4/21/2015.
-
Method Summary
Modifier and TypeMethodDescriptionvoidInvoke physical deletion.commit(Timestamp transactionTime, UUID committerId, UUID systemId, ContributionDataType contributionType, ContributionDef.ContributionState contributionState, I_ConceptAccess.ContributionChangeType contributionChangeType, String description) Commits given input as contribution record.commit(Timestamp transactionTime, ContributionDataType contributionType, ContributionDef.ContributionState state) Commits given input as contribution record.commitWithSignature(String signature) commit the contribution with a certifying signature
the signature is stored in the Contribution Version entry, the state of the contribution is then 'complete'get the contribution UUIDget the contribution stateget the contribution typegetEhrId()get the contribution Ehr Id it belongs togetId()static I_ContributionAccessgetInstance(I_DomainAccess domain, UUID ehrId, String tenantIdentifier) get a new minimal contribution access layer instanceget the contribution namespacestatic I_ContributionAccessretrieveInstance(I_DomainAccess domainAccess, UUID contributionId) retrieve an instance of I_ContributionAccess layer to the DBvoidsetAuditDetailsChangeType(UUID changeType) voidsetAuditDetailsCommitter(UUID committer) voidsetAuditDetailsDescription(String description) voidsetAuditDetailsSystemId(UUID system) voidsetAuditDetailsValues(com.nedap.archie.rm.generic.AuditDetails auditObject) voidsetAuditDetailsValues(UUID committer, UUID system, String description, I_ConceptAccess.ContributionChangeType changeType) Convenience setter for contribution's auditvoidset the contribution as completevoidsetContributionDataType(ContributionDataType contributionDataType) voidsetDataType(ContributionDataType contributionDataType) voidset the contribution as deletedvoidset the contribution Ehr Id it belongs tovoidsetHasAuditDetails(UUID auditId) voidset the contribution as incompletevoidset the state of contributionupdate(Timestamp transactionTime, UUID committerId, UUID systemId, String contributionType, String contributionState, String contributionChangeType, String description) Update with embedded audit update.update(Timestamp transactionTime, UUID committerId, UUID systemId, ContributionDataType contributionType, ContributionDef.ContributionState contributionState, I_ConceptAccess.ContributionChangeType contributionChangeType, String description) Update with embedded audit update.updateWithSignature(String signature)
-
Method Details
-
getInstance
get a new minimal contribution access layer instance- Parameters:
domain- SQL contextehrId- the EHR uuid this contribution belong totenantIdentifier- the tenant identifier to which the ContributionAccess object belongs to- Returns:
- a new minimal
I_ContributionAccess
-
retrieveInstance
retrieve an instance of I_ContributionAccess layer to the DB- Parameters:
domainAccess- SQL contextcontributionId- the contribution id- Returns:
- an I_ContributionAccess instance or null
- Throws:
InternalServerException- on failed fetching of contribution
-
updateWithSignature
-
commit
UUID commit(Timestamp transactionTime, ContributionDataType contributionType, ContributionDef.ContributionState state) Commits given input as contribution record. Creation of audit is required beforehand. All parameters are optional and will be provided with default values if NULL.- Parameters:
transactionTime- Timestamp of transaction timecontributionType- String representation of contribution typestate- String representation of contribution state- Returns:
-
commit
UUID commit(Timestamp transactionTime, UUID committerId, UUID systemId, ContributionDataType contributionType, ContributionDef.ContributionState contributionState, I_ConceptAccess.ContributionChangeType contributionChangeType, String description) Commits given input as contribution record. Embeds creation of audit for this commit. All parameters are optional and will be provided with default values if NULL.- Parameters:
transactionTime- Timestamp of transaction timecommitterId- ID of committersystemId- ID of committing systemcontributionType- String representation of contribution typecontributionState- String representation of contribution statecontributionChangeType- String representation of contribution change typedescription- Description- Returns:
UUIDof committed contribution- Throws:
InternalServerException- when contribution couldn't be created because of an internal problem
-
update
Boolean update(Timestamp transactionTime, UUID committerId, UUID systemId, String contributionType, String contributionState, String contributionChangeType, String description) Update with embedded audit update.- Parameters:
transactionTime- Timestamp of transaction timecommitterId- ID of committer (part of AuditDetails)systemId- ID of committing system (part of AuditDetails)contributionType- String representation of contribution typecontributionState- String representation of contribution statecontributionChangeType- String representation of contribution change type (part of AuditDetails)description- Description (part of AuditDetails)- Returns:
- True for success
-
update
Boolean update(Timestamp transactionTime, UUID committerId, UUID systemId, ContributionDataType contributionType, ContributionDef.ContributionState contributionState, I_ConceptAccess.ContributionChangeType contributionChangeType, String description) Update with embedded audit update.- Parameters:
transactionTime- Timestamp of transaction timecommitterId- ID of committer (part of AuditDetails)systemId- ID of committing system (part of AuditDetails)contributionType- ContributionDataType representation of contribution typecontributionState- ContributionState representation of contribution statecontributionChangeType- ContributionChangeType representation of contribution change type (part of AuditDetails)description- Description (part of AuditDetails)- Returns:
- True for success
-
commitWithSignature
commit the contribution with a certifying signature
the signature is stored in the Contribution Version entry, the state of the contribution is then 'complete'- Parameters:
signature- String representing the certification- Returns:
- UUID of committed contribution
-
getContributionId
UUID getContributionId()get the contribution UUID- Returns:
- ID of contribution
-
getContributionDataType
ContributionDataType getContributionDataType() -
setContributionDataType
-
setState
set the state of contribution- Parameters:
state- ContributionDef- See Also:
-
setComplete
void setComplete()set the contribution as complete -
setIncomplete
void setIncomplete()set the contribution as incomplete -
setDeleted
void setDeleted()set the contribution as deleted -
getContributionType
ContributionDef.ContributionType getContributionType()get the contribution type- Returns:
- type
- See Also:
-
getContributionState
ContributionDef.ContributionState getContributionState()get the contribution state- Returns:
- state
- See Also:
-
getEhrId
UUID getEhrId()get the contribution Ehr Id it belongs to- Returns:
- Ehr UUID
-
setEhrId
set the contribution Ehr Id it belongs to -
getNamespace
String getNamespace()get the contribution namespace -
getDataType
String getDataType() -
setDataType
-
getId
UUID getId() -
setAuditDetailsValues
void setAuditDetailsValues(UUID committer, UUID system, String description, I_ConceptAccess.ContributionChangeType changeType) Convenience setter for contribution's audit- Parameters:
committer- committer ID (Party Identified)system- system on which this is initiateddescription- descriptionchangeType- change type
-
setAuditDetailsValues
void setAuditDetailsValues(com.nedap.archie.rm.generic.AuditDetails auditObject) -
setAuditDetailsChangeType
-
setAuditDetailsCommitter
-
setAuditDetailsSystemId
-
setAuditDetailsDescription
-
getAuditsCommitter
UUID getAuditsCommitter() -
getAuditsSystemId
UUID getAuditsSystemId() -
getAuditsDescription
String getAuditsDescription() -
getAuditsChangeType
I_ConceptAccess.ContributionChangeType getAuditsChangeType() -
setHasAuditDetails
-
getHasAuditDetails
UUID getHasAuditDetails() -
adminDelete
void adminDelete()Invoke physical deletion.
-