Java 类ims.clinical.vo.domain.PlasticSurgeryAndBurnsVoAssembler 实例源码

项目:AvoinApotti    文件:EDischargePlasticSurgeryAndBurnsCentreDischargeComponentImpl.java   
public ims.clinical.vo.PlasticSurgeryAndBurnsVo getPlasticSurgeryAndBurnsVo(ims.core.admin.vo.CareContextRefVo refVoCareContext)
{
    if (refVoCareContext == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if (refVoCareContext != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from PlasticSurgeryAndBurns psb where ");
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " psb.careContext.id = :careContextId");
        markers.add("careContextId");
        values.add(refVoCareContext.getID_CareContext());
        andStr = " and ";

        List listNotes = factory.find(hql.toString(), markers, values);
        if (listNotes != null && listNotes.size() > 0)
        {
            PlasticSurgeryAndBurnsVoCollection voColl = PlasticSurgeryAndBurnsVoAssembler.createPlasticSurgeryAndBurnsVoCollectionFromPlasticSurgeryAndBurns(listNotes);
            if (voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:AvoinApotti    文件:EDischargePlasticSurgeryAndBurnsCentreDischargeComponentImpl.java   
public ims.clinical.vo.PlasticSurgeryAndBurnsVo savePlasticSurgeryAndBurnsVo(ims.clinical.vo.PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns, SummaryRefVo summary) throws ims.domain.exceptions.StaleObjectException
{
    if (voPlasticSurgeryAndBurns == null)
        throw new CodingRuntimeException("PlasticSurgeryAndBurns is null");

    if (!voPlasticSurgeryAndBurns.isValidated())
        throw new CodingRuntimeException("PlasticSurgeryAndBurns Value Object Alert has not been validated");

    DomainFactory factory = getDomainFactory();
    PlasticSurgeryAndBurns doPlasticSurgeryAndBurns = PlasticSurgeryAndBurnsVoAssembler.extractPlasticSurgeryAndBurns(factory, voPlasticSurgeryAndBurns);// //

    if (!voPlasticSurgeryAndBurns.getID_PlasticSurgeryAndBurnsIsNotNull())
    {
        List list = factory.find("from PlasticSurgeryAndBurns as psb where psb.careContext.id = :CONTEXTID and psb.isRIE is null", new String[] { "CONTEXTID" }, new Object[] { voPlasticSurgeryAndBurns.getCareContext().getID_CareContext() });
        if (list != null && list.size() > 0)
        {
            throw new StaleObjectException(null);
        }
    }

    factory.save(doPlasticSurgeryAndBurns);

    IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class); 
    impl.updateSummaryIfRequired(voPlasticSurgeryAndBurns, summary, factory);

    return PlasticSurgeryAndBurnsVoAssembler.create(doPlasticSurgeryAndBurns);
}
项目:openMAXIMS    文件:EDischargePlasticSurgeryAndBurnsCentreDischargeComponentImpl.java   
public ims.clinical.vo.PlasticSurgeryAndBurnsVo getPlasticSurgeryAndBurnsVo(ims.core.admin.vo.CareContextRefVo refVoCareContext)
{
    if (refVoCareContext == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if (refVoCareContext != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from PlasticSurgeryAndBurns psb where ");
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " psb.careContext.id = :careContextId");
        markers.add("careContextId");
        values.add(refVoCareContext.getID_CareContext());
        andStr = " and ";

        List listNotes = factory.find(hql.toString(), markers, values);
        if (listNotes != null && listNotes.size() > 0)
        {
            PlasticSurgeryAndBurnsVoCollection voColl = PlasticSurgeryAndBurnsVoAssembler.createPlasticSurgeryAndBurnsVoCollectionFromPlasticSurgeryAndBurns(listNotes);
            if (voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:EDischargePlasticSurgeryAndBurnsCentreDischargeComponentImpl.java   
public ims.clinical.vo.PlasticSurgeryAndBurnsVo savePlasticSurgeryAndBurnsVo(ims.clinical.vo.PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns, SummaryRefVo summary) throws ims.domain.exceptions.StaleObjectException
{
    if (voPlasticSurgeryAndBurns == null)
        throw new CodingRuntimeException("PlasticSurgeryAndBurns is null");

    if (!voPlasticSurgeryAndBurns.isValidated())
        throw new CodingRuntimeException("PlasticSurgeryAndBurns Value Object Alert has not been validated");

    DomainFactory factory = getDomainFactory();
    PlasticSurgeryAndBurns doPlasticSurgeryAndBurns = PlasticSurgeryAndBurnsVoAssembler.extractPlasticSurgeryAndBurns(factory, voPlasticSurgeryAndBurns);// //

    if (!voPlasticSurgeryAndBurns.getID_PlasticSurgeryAndBurnsIsNotNull())
    {
        List list = factory.find("from PlasticSurgeryAndBurns as psb where psb.careContext.id = :CONTEXTID and psb.isRIE is null", new String[] { "CONTEXTID" }, new Object[] { voPlasticSurgeryAndBurns.getCareContext().getID_CareContext() });
        if (list != null && list.size() > 0)
        {
            throw new StaleObjectException(null);
        }
    }

    factory.save(doPlasticSurgeryAndBurns);

    IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class); 
    impl.updateSummaryIfRequired(voPlasticSurgeryAndBurns, summary, factory);

    return PlasticSurgeryAndBurnsVoAssembler.create(doPlasticSurgeryAndBurns);
}
项目:openMAXIMS    文件:EDischargePlasticSurgeryAndBurnsCentreDischargeComponentImpl.java   
public ims.clinical.vo.PlasticSurgeryAndBurnsVo getPlasticSurgeryAndBurnsVo(ims.core.admin.vo.CareContextRefVo refVoCareContext)
{
    if (refVoCareContext == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if (refVoCareContext != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from PlasticSurgeryAndBurns psb where ");
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " psb.careContext.id = :careContextId");
        markers.add("careContextId");
        values.add(refVoCareContext.getID_CareContext());
        andStr = " and ";

        List listNotes = factory.find(hql.toString(), markers, values);
        if (listNotes != null && listNotes.size() > 0)
        {
            PlasticSurgeryAndBurnsVoCollection voColl = PlasticSurgeryAndBurnsVoAssembler.createPlasticSurgeryAndBurnsVoCollectionFromPlasticSurgeryAndBurns(listNotes);
            if (voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:EDischargePlasticSurgeryAndBurnsCentreDischargeComponentImpl.java   
public ims.clinical.vo.PlasticSurgeryAndBurnsVo savePlasticSurgeryAndBurnsVo(ims.clinical.vo.PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns, SummaryRefVo summary) throws ims.domain.exceptions.StaleObjectException
{
    if (voPlasticSurgeryAndBurns == null)
        throw new CodingRuntimeException("PlasticSurgeryAndBurns is null");

    if (!voPlasticSurgeryAndBurns.isValidated())
        throw new CodingRuntimeException("PlasticSurgeryAndBurns Value Object Alert has not been validated");

    DomainFactory factory = getDomainFactory();
    PlasticSurgeryAndBurns doPlasticSurgeryAndBurns = PlasticSurgeryAndBurnsVoAssembler.extractPlasticSurgeryAndBurns(factory, voPlasticSurgeryAndBurns);// //

    if (!voPlasticSurgeryAndBurns.getID_PlasticSurgeryAndBurnsIsNotNull())
    {
        List list = factory.find("from PlasticSurgeryAndBurns as psb where psb.careContext.id = :CONTEXTID and psb.isRIE is null", new String[] { "CONTEXTID" }, new Object[] { voPlasticSurgeryAndBurns.getCareContext().getID_CareContext() });
        if (list != null && list.size() > 0)
        {
            throw new StaleObjectException(null);
        }
    }

    factory.save(doPlasticSurgeryAndBurns);

    IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class); 
    impl.updateSummaryIfRequired(voPlasticSurgeryAndBurns, summary, factory);

    return PlasticSurgeryAndBurnsVoAssembler.create(doPlasticSurgeryAndBurns);
}
项目:openmaxims-linux    文件:EDischargePlasticSurgeryAndBurnsCentreDischargeComponentImpl.java   
public ims.clinical.vo.PlasticSurgeryAndBurnsVo getPlasticSurgeryAndBurnsVo(ims.core.admin.vo.CareContextRefVo refVoCareContext)
{
    if (refVoCareContext == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if (refVoCareContext != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from PlasticSurgeryAndBurns psb where ");
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " psb.careContext.id = :careContextId");
        markers.add("careContextId");
        values.add(refVoCareContext.getID_CareContext());
        andStr = " and ";

        List listNotes = factory.find(hql.toString(), markers, values);
        if (listNotes != null && listNotes.size() > 0)
        {
            PlasticSurgeryAndBurnsVoCollection voColl = PlasticSurgeryAndBurnsVoAssembler.createPlasticSurgeryAndBurnsVoCollectionFromPlasticSurgeryAndBurns(listNotes);
            if (voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openmaxims-linux    文件:EDischargePlasticSurgeryAndBurnsCentreDischargeComponentImpl.java   
public ims.clinical.vo.PlasticSurgeryAndBurnsVo savePlasticSurgeryAndBurnsVo(ims.clinical.vo.PlasticSurgeryAndBurnsVo voPlasticSurgeryAndBurns, SummaryRefVo summary) throws ims.domain.exceptions.StaleObjectException
{
    if (voPlasticSurgeryAndBurns == null)
        throw new CodingRuntimeException("PlasticSurgeryAndBurns is null");

    if (!voPlasticSurgeryAndBurns.isValidated())
        throw new CodingRuntimeException("PlasticSurgeryAndBurns Value Object Alert has not been validated");

    DomainFactory factory = getDomainFactory();
    PlasticSurgeryAndBurns doPlasticSurgeryAndBurns = PlasticSurgeryAndBurnsVoAssembler.extractPlasticSurgeryAndBurns(factory, voPlasticSurgeryAndBurns);// //

    if (!voPlasticSurgeryAndBurns.getID_PlasticSurgeryAndBurnsIsNotNull())
    {
        List list = factory.find("from PlasticSurgeryAndBurns as psb where psb.careContext.id = :CONTEXTID and psb.isRIE is null", new String[] { "CONTEXTID" }, new Object[] { voPlasticSurgeryAndBurns.getCareContext().getID_CareContext() });
        if (list != null && list.size() > 0)
        {
            throw new StaleObjectException(null);
        }
    }

    factory.save(doPlasticSurgeryAndBurns);

    IEDischargeHelper impl = (IEDischargeHelper) getDomainImpl(EDischargeHelper.class); 
    impl.updateSummaryIfRequired(voPlasticSurgeryAndBurns, summary, factory);

    return PlasticSurgeryAndBurnsVoAssembler.create(doPlasticSurgeryAndBurns);
}