Skip to content

Commit

Permalink
adding sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciaM1 committed Feb 8, 2024
1 parent 734f0e7 commit fcabc6a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ public Uni<Void> saveList(List<BpmnBankConfig> bpmnBankConfigs) {
return bankConfigRepository.persist(bpmnBankConfigs);
}

@WithSession
public Uni<List<BpmnBankConfig>> findByAcquirerIdAndFunctionType(String acquirerId, String functionType) {
return this.bankConfigRepository.findByAcquirerIdAndFunctionType(acquirerId, functionType);
}

@WithSession
public Uni<List<BpmnBankConfig>> findByBpmnVersionPK(BpmnVersionPK bpmnVersionPK) {
return this.bankConfigRepository.findByBpmnPK(bpmnVersionPK);
}
Expand All @@ -49,6 +51,7 @@ public Uni<Long> deleteByAcquirerIdAndFunctionType(String acquirerId, String fun
return this.bankConfigRepository.deleteByAcquirerIdAndFunctionType(acquirerId, functionType);
}

@WithSession
public Uni<Optional<BpmnBankConfig>> findByConfigurationsAndFunction(String acquirerId, String branchId, String terminalId, String functionType) {
return this.bankConfigRepository.findByConfigAndFunctionType(acquirerId, branchId, terminalId, functionType)
.onItem().transformToUni(Unchecked.function(x -> {
Expand All @@ -59,6 +62,7 @@ public Uni<Optional<BpmnBankConfig>> findByConfigurationsAndFunction(String acqu
}));
}

@WithSession
public Uni<List<BpmnBankConfigDTO>> findByAcquirerId(String acquirerId) {
return bankConfigRepository.findByAcquirerId(acquirerId)
.onItem()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ public class BpmnVersionServiceImpl implements BpmnVersionService {
static final DeployableResourceType resourceType = DeployableResourceType.BPMN;

@Override
@WithSession
public Uni<List<BpmnVersion>> getAll() {
return this.bpmnVersionRepository.findAll().list();
}

@Override
@WithSession
public Uni<List<BpmnVersion>> findByPKSet(Set<BpmnVersionPK> bpmnVersionPKSet) {
return this.bpmnVersionRepository.findByIds(bpmnVersionPKSet);
}
Expand Down Expand Up @@ -352,6 +354,7 @@ public Uni<BpmnVersion> setDeployInfo(BpmnVersionPK key, DeployResponseDto respo
}));
}

@WithSession
public Uni<BpmnVersion> getLatestVersion(UUID uuid, String functionType) {
return this.bpmnVersionRepository.findByIdAndFunction(uuid, functionType)
.onItem()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public Uni<ResourceEntity> updateResource(UUID uuid, File file) {
}

@Override
@WithSession
public Uni<PageInfo<ResourceEntity>> findResourceFiltered(int pageIndex, int pageSize, UUID resourceId, String sha256, NoDeployableResourceType noDeployableResourceType, String fileName, String storageKey, String extension) {
Map<String, Object> filters = new HashMap<>();
filters.put("resourceId", resourceId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ public Uni<Boolean> delete(UUID uuid) {
}

@Override
@WithSession
public Uni<List<WorkflowResource>> getAll() {
return this.workflowResourceRepository.findAll().list();
}
Expand Down

0 comments on commit fcabc6a

Please sign in to comment.