Package org.ehrbase.repository
Class ContributionRepository
java.lang.Object
org.ehrbase.repository.ContributionRepository
Handles DB-Access to
Contribution and AuditDetails- Author:
- Stefan Spiska
-
Constructor Summary
ConstructorsConstructorDescriptionContributionRepository(org.jooq.DSLContext context, SystemService systemService, IUserService userService, PartyService partyService, TenantService tenantService) -
Method Summary
Modifier and TypeMethodDescriptioncreateAudit(com.nedap.archie.rm.generic.AuditDetails auditDetails) Creates a Audit in the DatabasecreateDefault(UUID ehrId, ContributionDataType contributionType, ContributionChangeType contributionChangeType) Create the default contribution in the DB for usage in case data is not saved via explicit provided contribution.createDefaultAudit(ContributionChangeType contributionChangeType) Create the default audit in the DB for usage in case data is not saved via explicit provided contribution.
-
Constructor Details
-
ContributionRepository
public ContributionRepository(org.jooq.DSLContext context, SystemService systemService, IUserService userService, PartyService partyService, TenantService tenantService)
-
-
Method Details
-
createDefault
@Transactional public UUID createDefault(UUID ehrId, ContributionDataType contributionType, ContributionChangeType contributionChangeType) Create the default contribution in the DB for usage in case data is not saved via explicit provided contribution. Sets the committer from the auth context.- Parameters:
ehrId-contributionType-contributionChangeType-- Returns:
UUIDof the corresponding Database Record.
-
createDefaultAudit
Create the default audit in the DB for usage in case data is not saved via explicit provided contribution. Sets the committer from the auth context.- Parameters:
contributionChangeType-- Returns:
UUIDof the corresponding Database Record.
-
createAudit
Creates a Audit in the Database- Parameters:
auditDetails-AuditDetailsfrom which to take the data.- Returns:
UUIDof the corresponding Database Record.
-