public DomainList<BeneficiaryDomain> getBeneficiariesByArrangement( ArrangementDomain arrangement, Integer pageIndex, Integer pageSize) { Pageable pageable = new PageRequest(pageIndex, pageSize); Page<BeneficiaryDomain> page = beneficiaryRepository.findByArrangement(arrangement, pageable); return new DomainList<BeneficiaryDomain>(page.getContent(), (int) page.getTotalElements()); }
public void saveBeneficiary(BeneficiaryDomain beneficiary) { beneficiaryRepository.save(beneficiary); }
public BeneficiaryDomain getBeneficiaryByBeneficiaryId(String customerId, String beneficiaryId) { return beneficiaryRepository.findByBeneficiaryIdAndArrangementCustomerCustomerId( beneficiaryId, customerId); }