use of gov.ca.cwds.cms.data.access.CWSIdentifier in project api-core by ca-cwds.
the class SubstituteCareProviderCoreService method enrichOutOfStateChecks.
private void enrichOutOfStateChecks(ExtendedSCPEntityAwareDTO dto) {
if (CollectionUtils.isNotEmpty(dto.getOtherStatesOfLiving())) {
List<OutOfStateCheck> outOfStateChecks = new ArrayList<>(dto.getOtherStatesOfLiving().size());
for (CWSIdentifier stateId : dto.getOtherStatesOfLiving()) {
OutOfStateCheck outOfStateCheck = new OutOfStateCheck();
outOfStateCheck.setStateC((short) (stateId.getCwsId()));
outOfStateCheck.setRcpntId(dto.getEntity().getIdentifier());
outOfStateCheck.setRcpntCd("S");
outOfStateCheck.setIdentifier(IdGenerator.generateId());
outOfStateCheck.setLstUpdId(getStaffPersonId());
outOfStateCheck.setLstUpdTs(LocalDateTime.now());
outOfStateChecks.add(outOfStateCheck);
}
dto.setOutOfStateChecks(outOfStateChecks);
}
}
Aggregations