Interface I_EntryAccess

  • All Superinterfaces:
    I_SimpleCRUD
    All Known Implementing Classes:
    EntryAccess

    public interface I_EntryAccess
    extends I_SimpleCRUD
    Entry (Composition Content) access layer Created by Christian Chevalley on 4/21/2015.
    • Method Detail

      • getNewInstance

        static I_EntryAccess getNewInstance​(I_DomainAccess domain,
                                            String templateId,
                                            Integer sequence,
                                            UUID compositionId,
                                            com.nedap.archie.rm.composition.Composition composition)
        create and get a new Entry commit
        Parameters:
        domain - SQL context
        templateId - the template Id for the composition
        sequence - a sequence number (Integer) if applicable
        compositionId - the composition entry owning this content
        composition - the actual Composition to store
        Returns:
        an access layer instance
        See Also:
        Composition
      • retrieveInstanceInCompositionVersion

        static I_EntryAccess retrieveInstanceInCompositionVersion​(I_DomainAccess domainAccess,
                                                                  I_CompositionAccess compositionHistoryAccess,
                                                                  int version)
        Retrieve the I_EntryAccess linked to given composition history.
        Parameters:
        domainAccess - SQL context
        compositionHistoryAccess - the composition history access instance
        version - the version of the composition
        Returns:
        the entry access
      • deleteFromComposition

        static Integer deleteFromComposition​(I_DomainAccess domainAccess,
                                             UUID compositionId)
        delete all entries belonging to a composition
        Parameters:
        domainAccess - SQL access
        compositionId - a composition id
        Returns:
        count of deleted
      • delete

        static Integer delete​(I_DomainAccess domainAccess,
                              UUID id)
        delete an entry
        Parameters:
        domainAccess - SQL access
        id - UUID of entry to delete
        Returns:
        count of deleted
      • queryJSON

        static Map<String,​Object> queryJSON​(I_DomainAccess domainAccess,
                                                  String query)
        perform an arbitrary SQL query on entries and return the result set as a JSON string
        Parameters:
        domainAccess - SQL access
        query - a valid SQL queryJSON string
        Returns:
        a JSON formatted result set
        Throws:
        InternalServerException - when the query failed
      • getComposition

        com.nedap.archie.rm.composition.Composition getComposition()
        get the actual composition held in this entry
        Returns:
        Composition
        See Also:
        Composition
      • getId

        UUID getId()
        get the entry Id
        Returns:
        entry ID as UUID
      • getEntryJson

        org.jooq.JSONB getEntryJson()
        get the entry values as a JSON string
        Returns:
        JSON representation of entry values
      • getCategory

        DvCodedTextRecord getCategory()
        get the entry category record id
        Category attribute is a DvCodedText
        Returns:
        DvCodedText of category concept
      • getCompositionId

        UUID getCompositionId()
        get the composition Id owning this entry
        Returns:
        composition ID as UUID
      • setCompositionId

        void setCompositionId​(UUID compositionId)
        set the owner composition by its Id
        Parameters:
        compositionId - UUID
      • getTemplateId

        String getTemplateId()
        get the template Id (a string) used to build the composition entry
        Returns:
        template ID as string
      • setTemplateId

        void setTemplateId​(String templateId)
        set the template id to build the composition
        Parameters:
        templateId - a string
      • getSequence

        Integer getSequence()
        get the sequence number if applicable
        Returns:
        sequence number of entry
      • setSequence

        void setSequence​(Integer sequence)
        set the sequence number of this entry
        Parameters:
        sequence - number of this entry
      • getArchetypeId

        String getArchetypeId()
        Get the root archetype to build the composition
        Returns:
        archetype ID as string
      • getRmVersion

        String getRmVersion()
      • getItemType

        String getItemType()
        get the Item Type as a literal
        Item type is one of
        • section
        • care_entry
        • admin
        Returns:
        item type as string
      • setCompositionData

        void setCompositionData​(com.nedap.archie.rm.composition.Composition composition)
        set the composition data with an actual Composition
        Parameters:
        composition - Composition
        See Also:
        Composition