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 Detail

      • 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
      • setContributionDataType

        void setContributionDataType​(ContributionDataType contributionDataType)
      • setComplete

        void setComplete()
        set the contribution as complete
      • setIncomplete

        void setIncomplete()
        set the contribution as incomplete
      • setDeleted

        void setDeleted()
        set the contribution as deleted
      • 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
      • getDataType

        String getDataType()
      • 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()
      • setHasAuditDetails

        void setHasAuditDetails​(UUID auditId)
      • getHasAuditDetails

        UUID getHasAuditDetails()
      • adminDelete

        void adminDelete()
        Invoke physical deletion.