Search in sources :

Example 1 with RFA1aOtherAdult

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;
}
Also used : RFA1bForm(gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1bForm) RFA1aOtherAdult(gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aOtherAdult)

Example 2 with RFA1aOtherAdult

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;
}
Also used : RFAApplicantAwareEntityUpdateParams(gov.ca.cwds.cals.web.rest.parameter.RFAApplicantAwareEntityUpdateParams) RFAOtherAdultAwareEntityUpdateParams(gov.ca.cwds.cals.web.rest.parameter.RFAOtherAdultAwareEntityUpdateParams) RFA1aOtherAdult(gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aOtherAdult) RFA1aApplicant(gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aApplicant)

Example 3 with RFA1aOtherAdult

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;
}
Also used : RFAApplicantAwareEntityUpdateParams(gov.ca.cwds.cals.web.rest.parameter.RFAApplicantAwareEntityUpdateParams) RFAOtherAdultAwareEntityUpdateParams(gov.ca.cwds.cals.web.rest.parameter.RFAOtherAdultAwareEntityUpdateParams) RFA1aOtherAdult(gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aOtherAdult) RFA1aApplicant(gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aApplicant)

Example 4 with RFA1aOtherAdult

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;
}
Also used : RFA1aOtherAdult(gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aOtherAdult) LIC198bForm(gov.ca.cwds.cals.persistence.model.calsns.rfa.LIC198bForm)

Aggregations

RFA1aOtherAdult (gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aOtherAdult)4 RFA1aApplicant (gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1aApplicant)2 RFAApplicantAwareEntityUpdateParams (gov.ca.cwds.cals.web.rest.parameter.RFAApplicantAwareEntityUpdateParams)2 RFAOtherAdultAwareEntityUpdateParams (gov.ca.cwds.cals.web.rest.parameter.RFAOtherAdultAwareEntityUpdateParams)2 LIC198bForm (gov.ca.cwds.cals.persistence.model.calsns.rfa.LIC198bForm)1 RFA1bForm (gov.ca.cwds.cals.persistence.model.calsns.rfa.RFA1bForm)1