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 Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Integerdelete(I_DomainAccess domainAccess, UUID id)delete an entrystatic IntegerdeleteFromComposition(I_DomainAccess domainAccess, UUID compositionId)delete all entries belonging to a compositionStringgetArchetypeId()Get the root archetype to build the compositionDvCodedTextRecordgetCategory()get the entry category record id
Category attribute is a DvCodedTextcom.nedap.archie.rm.composition.CompositiongetComposition()get the actual composition held in this entryUUIDgetCompositionId()get the composition Id owning this entryorg.jooq.JSONBgetEntryJson()get the entry values as a JSON stringUUIDgetId()get the entry IdStringgetItemType()get the Item Type as a literal
Item type is one of section care_entry adminstatic I_EntryAccessgetNewInstance(I_DomainAccess domain, String templateId, Integer sequence, UUID compositionId, com.nedap.archie.rm.composition.Composition composition)create and get a new Entry commitStringgetRmVersion()IntegergetSequence()get the sequence number if applicableStringgetTemplateId()get the template Id (a string) used to build the composition entrystatic Map<String,Object>queryJSON(I_DomainAccess domainAccess, String query)perform an arbitrary SQL query on entries and return the result set as a JSON stringstatic List<I_EntryAccess>retrieveInstanceInComposition(I_DomainAccess domainAccess, I_CompositionAccess compositionAccess)retrieve the list of entries for a compositionstatic List<I_EntryAccess>retrieveInstanceInCompositionVersion(I_DomainAccess domainAccess, I_CompositionAccess compositionHistoryAccess, int version)voidsetCompositionData(com.nedap.archie.rm.composition.Composition composition)set the composition data with an actualCompositionvoidsetCompositionId(UUID compositionId)set the owner composition by its IdvoidsetSequence(Integer sequence)set the sequence number of this entryvoidsetTemplateId(String templateId)set the template id to build the composition
-
-
-
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 contexttemplateId- the template Id for the compositionsequence- a sequence number (Integer) if applicablecompositionId- the composition entry owning this contentcomposition- the actualCompositionto store- Returns:
- an access layer instance
- See Also:
Composition
-
retrieveInstanceInComposition
static List<I_EntryAccess> retrieveInstanceInComposition(I_DomainAccess domainAccess, I_CompositionAccess compositionAccess)
retrieve the list of entries for a composition- Parameters:
domainAccess- SQL contextcompositionAccess- a composition access interface instance- Returns:
- a list of
I_EntryAccess - Throws:
IllegalArgumentException- if DB is inconsistent or operation fails
-
retrieveInstanceInCompositionVersion
static List<I_EntryAccess> retrieveInstanceInCompositionVersion(I_DomainAccess domainAccess, I_CompositionAccess compositionHistoryAccess, int version)
-
deleteFromComposition
static Integer deleteFromComposition(I_DomainAccess domainAccess, UUID compositionId)
delete all entries belonging to a composition- Parameters:
domainAccess- SQL accesscompositionId- a composition id- Returns:
- count of deleted
-
delete
static Integer delete(I_DomainAccess domainAccess, UUID id)
delete an entry- Parameters:
domainAccess- SQL accessid-UUIDof 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 accessquery- 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
-
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:
DvCodedTextof 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 actualComposition- Parameters:
composition- Composition- See Also:
Composition
-
-