use of gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aOtherAdult in project cals-api by ca-cwds.
the class RFA1bDao method createForOtherAdult.
public RFA1bForm createForOtherAdult(RFA1bForm dto, Long otherAdultId) {
RFA1bForm rfa1bFormEntity = super.create(dto);
RFA1aOtherAdult otherAdult = otherAdultDao.find(otherAdultId);
otherAdult.setRfa1bForm(rfa1bFormEntity);
otherAdultDao.update(otherAdult);
return rfa1bFormEntity;
}
use of gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aOtherAdult 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.RFA1aOtherAdult 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;
}
use of gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aOtherAdult in project cals-api by ca-cwds.
the class LIC198bDao method createForOtherAdult.
public LIC198bForm createForOtherAdult(LIC198bForm entity, Long otherAdultId) {
LIC198bForm created = super.create(entity);
RFA1aOtherAdult otherAdult = otherAdultDao.find(otherAdultId);
otherAdult.setLic198bForm(created);
otherAdultDao.update(otherAdult);
return created;
}
Aggregations