java类ims.core.vo.domain.AlcoholVoAssembler的实例源码

RACPCSymptomAndRiskFactorImpl.java 文件源码 项目:AvoinApotti 阅读 31 收藏 0 点赞 0 评论 0
public RACPSymptomRiskFactorsVo saveRACPSymptomRiskFactorsVo(RACPSymptomRiskFactorsVo voRACPSymptomRiskFactors) throws StaleObjectException {
    if (voRACPSymptomRiskFactors == null  || !voRACPSymptomRiskFactors.isValidated())
        throw new CodingRuntimeException("Plan Advice is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    RACPSymptomsVoCollection symptoms = voRACPSymptomRiskFactors.getSymptoms();
    if(symptoms!=null){
        RACPSymptomsVoCollection collRACPSymptomsVo = new RACPSymptomsVoCollection();
        for (int i = 0; i < symptoms.size(); i++)
        {
            RACPSymptoms doSymptom = RACPSymptomsVoAssembler.extractRACPSymptoms(factory, symptoms.get(i));
            factory.save(doSymptom);
            collRACPSymptomsVo.add(RACPSymptomsVoAssembler.create(doSymptom));
        }
        voRACPSymptomRiskFactors.setSymptoms(collRACPSymptomsVo);
    }

    if(voRACPSymptomRiskFactors.getAlcoholUnitsPerWeekIsNotNull()){
        Alcohol doAlcohol  = AlcoholVoAssembler.extractAlcohol(factory, voRACPSymptomRiskFactors.getAlcoholUnitsPerWeek());
        factory.save(doAlcohol);
        voRACPSymptomRiskFactors.setAlcoholUnitsPerWeek(AlcoholVoAssembler.create(doAlcohol));
    }
    if(voRACPSymptomRiskFactors.getSmokingStatusIsNotNull()){
        Smoking doSmoking  = SmokingAssembler.extractSmoking(factory, voRACPSymptomRiskFactors.getSmokingStatus());
        factory.save(doSmoking);
        voRACPSymptomRiskFactors.setSmokingStatus(SmokingAssembler.create(doSmoking));
    }

    RACPSymptomRiskFactors doRACPSymptomRiskFactors = RACPSymptomRiskFactorsVoAssembler.extractRACPSymptomRiskFactors(factory, voRACPSymptomRiskFactors);
    factory.save(doRACPSymptomRiskFactors);
    return RACPSymptomRiskFactorsVoAssembler.create(doRACPSymptomRiskFactors);
}
RACPCSymptomAndRiskFactorImpl.java 文件源码 项目:openMAXIMS 阅读 18 收藏 0 点赞 0 评论 0
public RACPSymptomRiskFactorsVo saveRACPSymptomRiskFactorsVo(RACPSymptomRiskFactorsVo voRACPSymptomRiskFactors) throws StaleObjectException {
    if (voRACPSymptomRiskFactors == null  || !voRACPSymptomRiskFactors.isValidated())
        throw new CodingRuntimeException("Plan Advice is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    RACPSymptomsVoCollection symptoms = voRACPSymptomRiskFactors.getSymptoms();
    if(symptoms!=null){
        RACPSymptomsVoCollection collRACPSymptomsVo = new RACPSymptomsVoCollection();
        for (int i = 0; i < symptoms.size(); i++)
        {
            RACPSymptoms doSymptom = RACPSymptomsVoAssembler.extractRACPSymptoms(factory, symptoms.get(i));
            factory.save(doSymptom);
            collRACPSymptomsVo.add(RACPSymptomsVoAssembler.create(doSymptom));
        }
        voRACPSymptomRiskFactors.setSymptoms(collRACPSymptomsVo);
    }

    if(voRACPSymptomRiskFactors.getAlcoholUnitsPerWeekIsNotNull()){
        Alcohol doAlcohol  = AlcoholVoAssembler.extractAlcohol(factory, voRACPSymptomRiskFactors.getAlcoholUnitsPerWeek());
        factory.save(doAlcohol);
        voRACPSymptomRiskFactors.setAlcoholUnitsPerWeek(AlcoholVoAssembler.create(doAlcohol));
    }
    if(voRACPSymptomRiskFactors.getSmokingStatusIsNotNull()){
        Smoking doSmoking  = SmokingAssembler.extractSmoking(factory, voRACPSymptomRiskFactors.getSmokingStatus());
        factory.save(doSmoking);
        voRACPSymptomRiskFactors.setSmokingStatus(SmokingAssembler.create(doSmoking));
    }

    RACPSymptomRiskFactors doRACPSymptomRiskFactors = RACPSymptomRiskFactorsVoAssembler.extractRACPSymptomRiskFactors(factory, voRACPSymptomRiskFactors);
    factory.save(doRACPSymptomRiskFactors);
    return RACPSymptomRiskFactorsVoAssembler.create(doRACPSymptomRiskFactors);
}
RACPCSymptomAndRiskFactorImpl.java 文件源码 项目:openMAXIMS 阅读 18 收藏 0 点赞 0 评论 0
public RACPSymptomRiskFactorsVo saveRACPSymptomRiskFactorsVo(RACPSymptomRiskFactorsVo voRACPSymptomRiskFactors) throws StaleObjectException {
    if (voRACPSymptomRiskFactors == null  || !voRACPSymptomRiskFactors.isValidated())
        throw new CodingRuntimeException("Plan Advice is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    RACPSymptomsVoCollection symptoms = voRACPSymptomRiskFactors.getSymptoms();
    if(symptoms!=null){
        RACPSymptomsVoCollection collRACPSymptomsVo = new RACPSymptomsVoCollection();
        for (int i = 0; i < symptoms.size(); i++)
        {
            RACPSymptoms doSymptom = RACPSymptomsVoAssembler.extractRACPSymptoms(factory, symptoms.get(i));
            factory.save(doSymptom);
            collRACPSymptomsVo.add(RACPSymptomsVoAssembler.create(doSymptom));
        }
        voRACPSymptomRiskFactors.setSymptoms(collRACPSymptomsVo);
    }

    if(voRACPSymptomRiskFactors.getAlcoholUnitsPerWeekIsNotNull()){
        Alcohol doAlcohol  = AlcoholVoAssembler.extractAlcohol(factory, voRACPSymptomRiskFactors.getAlcoholUnitsPerWeek());
        factory.save(doAlcohol);
        voRACPSymptomRiskFactors.setAlcoholUnitsPerWeek(AlcoholVoAssembler.create(doAlcohol));
    }
    if(voRACPSymptomRiskFactors.getSmokingStatusIsNotNull()){
        Smoking doSmoking  = SmokingAssembler.extractSmoking(factory, voRACPSymptomRiskFactors.getSmokingStatus());
        factory.save(doSmoking);
        voRACPSymptomRiskFactors.setSmokingStatus(SmokingAssembler.create(doSmoking));
    }

    RACPSymptomRiskFactors doRACPSymptomRiskFactors = RACPSymptomRiskFactorsVoAssembler.extractRACPSymptomRiskFactors(factory, voRACPSymptomRiskFactors);
    factory.save(doRACPSymptomRiskFactors);
    return RACPSymptomRiskFactorsVoAssembler.create(doRACPSymptomRiskFactors);
}
RACPCSymptomAndRiskFactorImpl.java 文件源码 项目:openmaxims-linux 阅读 17 收藏 0 点赞 0 评论 0
public RACPSymptomRiskFactorsVo saveRACPSymptomRiskFactorsVo(RACPSymptomRiskFactorsVo voRACPSymptomRiskFactors) throws StaleObjectException {
    if (voRACPSymptomRiskFactors == null  || !voRACPSymptomRiskFactors.isValidated())
        throw new CodingRuntimeException("Plan Advice is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    RACPSymptomsVoCollection symptoms = voRACPSymptomRiskFactors.getSymptoms();
    if(symptoms!=null){
        RACPSymptomsVoCollection collRACPSymptomsVo = new RACPSymptomsVoCollection();
        for (int i = 0; i < symptoms.size(); i++)
        {
            RACPSymptoms doSymptom = RACPSymptomsVoAssembler.extractRACPSymptoms(factory, symptoms.get(i));
            factory.save(doSymptom);
            collRACPSymptomsVo.add(RACPSymptomsVoAssembler.create(doSymptom));
        }
        voRACPSymptomRiskFactors.setSymptoms(collRACPSymptomsVo);
    }

    if(voRACPSymptomRiskFactors.getAlcoholUnitsPerWeekIsNotNull()){
        Alcohol doAlcohol  = AlcoholVoAssembler.extractAlcohol(factory, voRACPSymptomRiskFactors.getAlcoholUnitsPerWeek());
        factory.save(doAlcohol);
        voRACPSymptomRiskFactors.setAlcoholUnitsPerWeek(AlcoholVoAssembler.create(doAlcohol));
    }
    if(voRACPSymptomRiskFactors.getSmokingStatusIsNotNull()){
        Smoking doSmoking  = SmokingAssembler.extractSmoking(factory, voRACPSymptomRiskFactors.getSmokingStatus());
        factory.save(doSmoking);
        voRACPSymptomRiskFactors.setSmokingStatus(SmokingAssembler.create(doSmoking));
    }

    RACPSymptomRiskFactors doRACPSymptomRiskFactors = RACPSymptomRiskFactorsVoAssembler.extractRACPSymptomRiskFactors(factory, voRACPSymptomRiskFactors);
    factory.save(doRACPSymptomRiskFactors);
    return RACPSymptomRiskFactorsVoAssembler.create(doRACPSymptomRiskFactors);
}


问题


面经


文章

微信
公众号

扫码关注公众号