Search in sources :

Example 1 with LIC198bDao

use of gov.ca.cwds.cals.persistence.dao.calsns.LIC198bDao in project cals-api by ca-cwds.

the class LIC198bService method create.

@Override
public LIC198bFormDTO create(RFAExternalEntityUpdateParameterObject<LIC198bFormDTO> request) {
    LIC198bForm lic198bForm = composeEntity(request);
    LIC198bDao dao = (LIC198bDao) getDao();
    if (request instanceof RFAApplicantAwareEntityUpdateParams) {
        RFAApplicantAwareEntityUpdateParams params = (RFAApplicantAwareEntityUpdateParams) request;
        lic198bForm = dao.createForApplicant(lic198bForm, params.getApplicantId());
    } else if (request instanceof RFAOtherAdultAwareEntityUpdateParams) {
        RFAOtherAdultAwareEntityUpdateParams params = (RFAOtherAdultAwareEntityUpdateParams) request;
        lic198bForm = dao.createForOtherAdult(lic198bForm, params.getOtherAdultId());
    }
    return extractDTO(lic198bForm);
}
Also used : LIC198bDao(gov.ca.cwds.cals.persistence.dao.calsns.LIC198bDao) RFAApplicantAwareEntityUpdateParams(gov.ca.cwds.cals.web.rest.parameter.RFAApplicantAwareEntityUpdateParams) RFAOtherAdultAwareEntityUpdateParams(gov.ca.cwds.cals.web.rest.parameter.RFAOtherAdultAwareEntityUpdateParams) LIC198bForm(gov.ca.cwds.cals.persistence.model.calsns.rfa.LIC198bForm)

Aggregations

LIC198bDao (gov.ca.cwds.cals.persistence.dao.calsns.LIC198bDao)1 LIC198bForm (gov.ca.cwds.cals.persistence.model.calsns.rfa.LIC198bForm)1 RFAApplicantAwareEntityUpdateParams (gov.ca.cwds.cals.web.rest.parameter.RFAApplicantAwareEntityUpdateParams)1 RFAOtherAdultAwareEntityUpdateParams (gov.ca.cwds.cals.web.rest.parameter.RFAOtherAdultAwareEntityUpdateParams)1