Interface I_ContributionAccess

All Superinterfaces:
I_SimpleCRUD
All Known Implementing Classes:
ContributionAccess

public interface I_ContributionAccess extends I_SimpleCRUD
Access layer to Contributions Created by Christian Chevalley on 4/21/2015.
  • Method Details

    • getInstance

      static I_ContributionAccess getInstance(I_DomainAccess domain, UUID ehrId, String tenantIdentifier)
      get a new minimal contribution access layer instance
      Parameters:
      domain - SQL context
      ehrId - the EHR uuid this contribution belong to
      tenantIdentifier - the tenant identifier to which the ContributionAccess object belongs to
      Returns:
      a new minimal I_ContributionAccess
    • retrieveInstance

      static I_ContributionAccess retrieveInstance(I_DomainAccess domainAccess, UUID contributionId)
      retrieve an instance of I_ContributionAccess layer to the DB
      Parameters:
      domainAccess - SQL context
      contributionId - the contribution id
      Returns:
      an I_ContributionAccess instance or null
      Throws:
      InternalServerException - on failed fetching of contribution
    • updateWithSignature

      UUID updateWithSignature(String signature)
    • 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 time
      contributionType - String representation of contribution type
      state - 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 time
      committerId - ID of committer
      systemId - ID of committing system
      contributionType - String representation of contribution type
      contributionState - String representation of contribution state
      contributionChangeType - String representation of contribution change type
      description - Description
      Returns:
      UUID of 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 time
      committerId - ID of committer (part of AuditDetails)
      systemId - ID of committing system (part of AuditDetails)
      contributionType - String representation of contribution type
      contributionState - String representation of contribution state
      contributionChangeType - 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 time
      committerId - ID of committer (part of AuditDetails)
      systemId - ID of committing system (part of AuditDetails)
      contributionType - ContributionDataType representation of contribution type
      contributionState - ContributionState representation of contribution state
      contributionChangeType - ContributionChangeType representation of contribution change type (part of AuditDetails)
      description - Description (part of AuditDetails)
      Returns:
      True for success
    • commitWithSignature

      UUID 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'
      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

      void setContributionDataType(ContributionDataType contributionDataType)
    • setState

      void setState(ContributionDef.ContributionState state)
      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

      void setEhrId(UUID ehrId)
      set the contribution Ehr Id it belongs to
    • getNamespace

      String getNamespace()
      get the contribution namespace
    • getDataType

      String getDataType()
    • setDataType

      void setDataType(ContributionDataType contributionDataType)
    • 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 initiated
      description - description
      changeType - change type
    • setAuditDetailsValues

      void setAuditDetailsValues(com.nedap.archie.rm.generic.AuditDetails auditObject)
    • setAuditDetailsChangeType

      void setAuditDetailsChangeType(UUID changeType)
    • setAuditDetailsCommitter

      void setAuditDetailsCommitter(UUID committer)
    • setAuditDetailsSystemId

      void setAuditDetailsSystemId(UUID system)
    • setAuditDetailsDescription

      void setAuditDetailsDescription(String description)
    • getAuditsCommitter

      UUID getAuditsCommitter()
    • getAuditsSystemId

      UUID getAuditsSystemId()
    • getAuditsDescription

      String getAuditsDescription()
    • getAuditsChangeType

    • setHasAuditDetails

      void setHasAuditDetails(UUID auditId)
    • getHasAuditDetails

      UUID getHasAuditDetails()
    • adminDelete

      void adminDelete()
      Invoke physical deletion.