use of gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aApplicant in project cals-api by ca-cwds.
the class LIC198bDao method createForApplicant.
public LIC198bForm createForApplicant(LIC198bForm entity, Long applicantId) {
LIC198bForm created = super.create(entity);
RFA1aApplicant rfa1aApplicant = applicantDao.find(applicantId);
rfa1aApplicant.setLic198bForm(created);
applicantDao.update(rfa1aApplicant);
return created;
}
use of gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aApplicant in project cals-api by ca-cwds.
the class RFA1bDao method createForApplicant.
public RFA1bForm createForApplicant(RFA1bForm dto, Long applicantId) {
RFA1bForm rfa1bFormEntity = super.create(dto);
RFA1aApplicant rfa1aApplicant = applicantDao.find(applicantId);
rfa1aApplicant.setRFA1bForm(rfa1bFormEntity);
applicantDao.update(rfa1aApplicant);
return rfa1bFormEntity;
}
use of gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aApplicant in project cals-api by ca-cwds.
the class RFA1bService method find.
public RFA1bFormDTO find(RFAExternalEntityUpdateParameterObject<RFA1bFormDTO> params) {
if (params instanceof RFAApplicantAwareEntityUpdateParams) {
Long applicantId = ((RFAApplicantAwareEntityUpdateParams) params).getApplicantId();
RFA1aApplicant applicant = applicantDao.find(applicantId);
return extractDTO(applicant.getRfa1bForm());
} else if (params instanceof RFAOtherAdultAwareEntityUpdateParams) {
Long otherAdultId = ((RFAOtherAdultAwareEntityUpdateParams) params).getOtherAdultId();
RFA1aOtherAdult rfa1aOtherAdult = otherAdultDao.find(otherAdultId);
return extractDTO(rfa1aOtherAdult.getRfa1bForm());
}
return null;
}
use of gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aApplicant in project cals-api by ca-cwds.
the class ApplicantNamesDuplicationConstraintPostConfiguration method buildModifiedForm.
public RFA1aForm buildModifiedForm(RFA1aForm form, ApplicantDTO applicantDTO) {
RFA1aApplicant newApplicant = new RFA1aApplicant();
newApplicant.setApplicant(applicantDTO);
Hibernate.initialize(form.getApplicants());
getCurrentSession().detach(form);
form.getApplicants().add(newApplicant);
return form;
}
use of gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aApplicant in project cals-api by ca-cwds.
the class LIC198bService method find.
public LIC198bFormDTO find(RFAExternalEntityUpdateParameterObject<RFA1bFormDTO> params) {
if (params instanceof RFAApplicantAwareEntityUpdateParams) {
Long applicantId = ((RFAApplicantAwareEntityUpdateParams) params).getApplicantId();
RFA1aApplicant applicant = applicantDao.find(applicantId);
return extractDTO(applicant.getLic198bForm());
} else if (params instanceof RFAOtherAdultAwareEntityUpdateParams) {
Long otherAdultId = ((RFAOtherAdultAwareEntityUpdateParams) params).getOtherAdultId();
RFA1aOtherAdult rfa1aOtherAdult = otherAdultDao.find(otherAdultId);
return extractDTO(rfa1aOtherAdult.getLic198bForm());
}
return null;
}
Aggregations