Java 类ims.clinical.vo.DischargeSupplementaryNotesVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void openSupplementary() 
{
    if (form.getMode().equals(FormMode.EDIT))
        return;

    clearInstanceControls();
    DischargeSupplementaryNotesVo voNotes = domain.getSupplementary(form.getGlobalContext().Core.getCurrentCareContext());
    if (voNotes != null)
        populateScreenFromData(voNotes);

    form.getLocalContext().setSelectedRecord(voNotes);

    if (voNotes != null
            && voNotes.getCompletedOnIsNotNull())
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(false);
    else
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setEnabled(true);
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(true);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void openSupplementary() 
{
    if (form.getMode().equals(FormMode.EDIT))
        return;

    clearInstanceControls();
    DischargeSupplementaryNotesVo voNotes = domain.getSupplementary(form.getGlobalContext().Core.getCurrentCareContext());
    if (voNotes != null)
        populateScreenFromData(voNotes);

    form.getLocalContext().setSelectedRecord(voNotes);

    if (voNotes != null
            && voNotes.getCompletedOnIsNotNull())
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(false);
        form.getLocalContext().setisReadOnly(true);
    }
    else
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setEnabled(true);
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void openSupplementary() 
{
    if (form.getMode().equals(FormMode.EDIT))
        return;

    clearInstanceControls();
    DischargeSupplementaryNotesVo voNotes = domain.getSupplementary(form.getGlobalContext().Core.getCurrentCareContext());
    if (voNotes != null)
        populateScreenFromData(voNotes);

    form.getLocalContext().setSelectedRecord(voNotes);

    if (voNotes != null
            && voNotes.getCompletedOnIsNotNull())
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(false);
    else
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setEnabled(true);
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void openSupplementary() 
{
    if (form.getMode().equals(FormMode.EDIT))
        return;

    clearInstanceControls();
    DischargeSupplementaryNotesVo voNotes = domain.getSupplementary(form.getGlobalContext().Core.getCurrentCareContext());
    if (voNotes != null)
        populateScreenFromData(voNotes);

    form.getLocalContext().setSelectedRecord(voNotes);

    if (voNotes != null
            && voNotes.getCompletedOnIsNotNull())
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(false);
        form.getLocalContext().setisReadOnly(true);
    }
    else
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setEnabled(true);
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void openSupplementary() 
{
    if (form.getMode().equals(FormMode.EDIT))
        return;

    clearInstanceControls();
    DischargeSupplementaryNotesVo voNotes = domain.getSupplementary(form.getGlobalContext().Core.getCurrentCareContext());
    if (voNotes != null)
        populateScreenFromData(voNotes);

    form.getLocalContext().setSelectedRecord(voNotes);

    if (voNotes != null
            && voNotes.getCompletedOnIsNotNull())
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(false);
    else
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setEnabled(true);
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(true);
    }
}
项目:openMAXIMS    文件:Logic.java   
private void openSupplementary() 
{
    if (form.getMode().equals(FormMode.EDIT))
        return;

    clearInstanceControls();
    DischargeSupplementaryNotesVo voNotes = domain.getSupplementary(form.getGlobalContext().Core.getCurrentCareContext());
    if (voNotes != null)
        populateScreenFromData(voNotes);

    form.getLocalContext().setSelectedRecord(voNotes);

    if (voNotes != null
            && voNotes.getCompletedOnIsNotNull())
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(false);
        form.getLocalContext().setisReadOnly(true);
    }
    else
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setEnabled(true);
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(true);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void openSupplementary() 
{
    if (form.getMode().equals(FormMode.EDIT))
        return;

    clearInstanceControls();
    DischargeSupplementaryNotesVo voNotes = domain.getSupplementary(form.getGlobalContext().Core.getCurrentCareContext());
    if (voNotes != null)
        populateScreenFromData(voNotes);

    form.getLocalContext().setSelectedRecord(voNotes);

    if (voNotes != null
            && voNotes.getCompletedOnIsNotNull())
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(false);
    else
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setEnabled(true);
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(true);
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void openSupplementary() 
{
    if (form.getMode().equals(FormMode.EDIT))
        return;

    clearInstanceControls();
    DischargeSupplementaryNotesVo voNotes = domain.getSupplementary(form.getGlobalContext().Core.getCurrentCareContext());
    if (voNotes != null)
        populateScreenFromData(voNotes);

    form.getLocalContext().setSelectedRecord(voNotes);

    if (voNotes != null
            && voNotes.getCompletedOnIsNotNull())
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(false);
        form.getLocalContext().setisReadOnly(true);
    }
    else
    {
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setEnabled(true);
        form.lyrDetails().tabPageSupplementary().btnEditSupp().setVisible(true);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(DischargeSupplementaryNotesVo voNotes)
{
    if (voNotes == null)
        return;

    form.lyrDetails().tabPageSupplementary().richTextSupplementary().setValue(voNotes.getSupplementaryNoteIsNotNull() ? voNotes.getSupplementaryNote() : null);
    form.lyrDetails().tabPageSupplementary().ccAuthoring().setValue(voNotes.getAuthoringInformationIsNotNull() ? voNotes.getAuthoringInformation() : null);
    form.lyrDetails().tabPageSupplementary().chkCompleted().setValue(voNotes.getCompletedOnIsNotNull() ? true : false);
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(DischargeSupplementaryNotesVo voNotes)
{
    if (voNotes == null)
        return;

    form.lyrDetails().tabPageSupplementary().richTextSupplementary().setValue(voNotes.getSupplementaryNoteIsNotNull() ? voNotes.getSupplementaryNote() : null);
    form.lyrDetails().tabPageSupplementary().ccAuthoring().setValue(voNotes.getAuthoringInformationIsNotNull() ? voNotes.getAuthoringInformation() : null);
    form.lyrDetails().tabPageSupplementary().chkCompleted().setValue(voNotes.getCompletedOnIsNotNull() ? true : false);
}
项目:AvoinApotti    文件:EDischargeSTHKImpl.java   
public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) 
{
    if(voCareContextRefVo == null)
        throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. ");

    if(voCareContextRefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where "); 
        String andStr = " ";

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

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

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeSupplementaryNotesVoCollection voColl = DischargeSupplementaryNotesVoAssembler.createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:AvoinApotti    文件:EDischargeImpl.java   
public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) 
{
    if(voCareContextRefVo == null)
        throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. ");

    if(voCareContextRefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where "); 
        String andStr = " ";

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

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

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeSupplementaryNotesVoCollection voColl = DischargeSupplementaryNotesVoAssembler.createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:AvoinApotti    文件:EDischargeImpl.java   
public DischargeSupplementaryNotesVo saveSupplementaryAndDD(DischargeSupplementaryNotesVo voDischSupp, DischargeDetailsVo voDD) throws DomainInterfaceException, StaleObjectException 
{
    if(voDischSupp == null)
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo is null");

    if(!voDischSupp.isValidated())
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeSupplementaryNotes doDSN = DischargeSupplementaryNotesVoAssembler.extractDischargeSupplementaryNotes(factory, voDischSupp);

    //WDEV-8813
    // Workaround for the case when 2 users save in the same time a new DischargeSupplementaryNotesVO
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case
    if (!voDischSupp.getID_DischargeSupplementaryNotesIsNotNull())
    {
        DischargeSupplementaryNotesVo voDischargeSupp = getSupplementary(voDischSupp.getCareContext());
        if (voDischargeSupp!=null)
        {
            throw new StaleObjectException(doDSN,"A DischargeSupplementaryNotesVo was already saved by another user");
        }
    }


    factory.save(doDSN);


    if (voDD != null)
    {
        DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDD);
        factory.save(doDD);
    }
    return DischargeSupplementaryNotesVoAssembler.create(doDSN);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DischargeSupplementaryNotesVo voNotes)
{
    if (voNotes == null)
        return;

    form.lyrDetails().tabPageSupplementary().richTextSupplementary().setValue(voNotes.getSupplementaryNoteIsNotNull() ? voNotes.getSupplementaryNote() : null);
    form.lyrDetails().tabPageSupplementary().ccAuthoring().setValue(voNotes.getAuthoringInformationIsNotNull() ? voNotes.getAuthoringInformation() : null);
    form.lyrDetails().tabPageSupplementary().chkCompleted().setValue(voNotes.getCompletedOnIsNotNull() ? true : false);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DischargeSupplementaryNotesVo voNotes)
{
    if (voNotes == null)
        return;

    form.lyrDetails().tabPageSupplementary().richTextSupplementary().setValue(voNotes.getSupplementaryNoteIsNotNull() ? voNotes.getSupplementaryNote() : null);
    form.lyrDetails().tabPageSupplementary().ccAuthoring().setValue(voNotes.getAuthoringInformationIsNotNull() ? voNotes.getAuthoringInformation() : null);
    form.lyrDetails().tabPageSupplementary().chkCompleted().setValue(voNotes.getCompletedOnIsNotNull() ? true : false);
}
项目:openMAXIMS    文件:EDischargeSTHKImpl.java   
public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) 
{
    if(voCareContextRefVo == null)
        throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. ");

    if(voCareContextRefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where "); 
        String andStr = " ";

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

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

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeSupplementaryNotesVoCollection voColl = DischargeSupplementaryNotesVoAssembler.createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:EDischargeImpl.java   
public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) 
{
    if(voCareContextRefVo == null)
        throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. ");

    if(voCareContextRefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where "); 
        String andStr = " ";

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

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

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeSupplementaryNotesVoCollection voColl = DischargeSupplementaryNotesVoAssembler.createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:EDischargeImpl.java   
public DischargeSupplementaryNotesVo saveSupplementaryAndDD(DischargeSupplementaryNotesVo voDischSupp, DischargeDetailsVo voDD) throws DomainInterfaceException, StaleObjectException 
{
    if(voDischSupp == null)
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo is null");

    if(!voDischSupp.isValidated())
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeSupplementaryNotes doDSN = DischargeSupplementaryNotesVoAssembler.extractDischargeSupplementaryNotes(factory, voDischSupp);

    //WDEV-8813
    // Workaround for the case when 2 users save in the same time a new DischargeSupplementaryNotesVO
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case
    if (!voDischSupp.getID_DischargeSupplementaryNotesIsNotNull())
    {
        DischargeSupplementaryNotesVo voDischargeSupp = getSupplementary(voDischSupp.getCareContext());
        if (voDischargeSupp!=null)
        {
            throw new StaleObjectException(doDSN,"A DischargeSupplementaryNotesVo was already saved by another user");
        }
    }


    factory.save(doDSN);


    if (voDD != null)
    {
        DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDD);
        factory.save(doDD);
    }
    return DischargeSupplementaryNotesVoAssembler.create(doDSN);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DischargeSupplementaryNotesVo voNotes)
{
    if (voNotes == null)
        return;

    form.lyrDetails().tabPageSupplementary().richTextSupplementary().setValue(voNotes.getSupplementaryNoteIsNotNull() ? voNotes.getSupplementaryNote() : null);
    form.lyrDetails().tabPageSupplementary().ccAuthoring().setValue(voNotes.getAuthoringInformationIsNotNull() ? voNotes.getAuthoringInformation() : null);
    form.lyrDetails().tabPageSupplementary().chkCompleted().setValue(voNotes.getCompletedOnIsNotNull() ? true : false);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DischargeSupplementaryNotesVo voNotes)
{
    if (voNotes == null)
        return;

    form.lyrDetails().tabPageSupplementary().richTextSupplementary().setValue(voNotes.getSupplementaryNoteIsNotNull() ? voNotes.getSupplementaryNote() : null);
    form.lyrDetails().tabPageSupplementary().ccAuthoring().setValue(voNotes.getAuthoringInformationIsNotNull() ? voNotes.getAuthoringInformation() : null);
    form.lyrDetails().tabPageSupplementary().chkCompleted().setValue(voNotes.getCompletedOnIsNotNull() ? true : false);
}
项目:openMAXIMS    文件:EDischargeSTHKImpl.java   
public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) 
{
    if(voCareContextRefVo == null)
        throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. ");

    if(voCareContextRefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where "); 
        String andStr = " ";

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

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

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeSupplementaryNotesVoCollection voColl = DischargeSupplementaryNotesVoAssembler.createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:EDischargeImpl.java   
public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) 
{
    if(voCareContextRefVo == null)
        throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. ");

    if(voCareContextRefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where "); 
        String andStr = " ";

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

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

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeSupplementaryNotesVoCollection voColl = DischargeSupplementaryNotesVoAssembler.createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openMAXIMS    文件:EDischargeImpl.java   
public DischargeSupplementaryNotesVo saveSupplementaryAndDD(DischargeSupplementaryNotesVo voDischSupp, DischargeDetailsVo voDD) throws DomainInterfaceException, StaleObjectException 
{
    if(voDischSupp == null)
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo is null");

    if(!voDischSupp.isValidated())
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeSupplementaryNotes doDSN = DischargeSupplementaryNotesVoAssembler.extractDischargeSupplementaryNotes(factory, voDischSupp);

    //WDEV-8813
    // Workaround for the case when 2 users save in the same time a new DischargeSupplementaryNotesVO
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case
    if (!voDischSupp.getID_DischargeSupplementaryNotesIsNotNull())
    {
        DischargeSupplementaryNotesVo voDischargeSupp = getSupplementary(voDischSupp.getCareContext());
        if (voDischargeSupp!=null)
        {
            throw new StaleObjectException(doDSN,"A DischargeSupplementaryNotesVo was already saved by another user");
        }
    }


    factory.save(doDSN);


    if (voDD != null)
    {
        DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDD);
        factory.save(doDD);
    }
    return DischargeSupplementaryNotesVoAssembler.create(doDSN);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromData(DischargeSupplementaryNotesVo voNotes)
{
    if (voNotes == null)
        return;

    form.lyrDetails().tabPageSupplementary().richTextSupplementary().setValue(voNotes.getSupplementaryNoteIsNotNull() ? voNotes.getSupplementaryNote() : null);
    form.lyrDetails().tabPageSupplementary().ccAuthoring().setValue(voNotes.getAuthoringInformationIsNotNull() ? voNotes.getAuthoringInformation() : null);
    form.lyrDetails().tabPageSupplementary().chkCompleted().setValue(voNotes.getCompletedOnIsNotNull() ? true : false);
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromData(DischargeSupplementaryNotesVo voNotes)
{
    if (voNotes == null)
        return;

    form.lyrDetails().tabPageSupplementary().richTextSupplementary().setValue(voNotes.getSupplementaryNoteIsNotNull() ? voNotes.getSupplementaryNote() : null);
    form.lyrDetails().tabPageSupplementary().ccAuthoring().setValue(voNotes.getAuthoringInformationIsNotNull() ? voNotes.getAuthoringInformation() : null);
    form.lyrDetails().tabPageSupplementary().chkCompleted().setValue(voNotes.getCompletedOnIsNotNull() ? true : false);
}
项目:openmaxims-linux    文件:EDischargeSTHKImpl.java   
public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) 
{
    if(voCareContextRefVo == null)
        throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. ");

    if(voCareContextRefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where "); 
        String andStr = " ";

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

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

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeSupplementaryNotesVoCollection voColl = DischargeSupplementaryNotesVoAssembler.createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openmaxims-linux    文件:EDischargeImpl.java   
public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) 
{
    if(voCareContextRefVo == null)
        throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. ");

    if(voCareContextRefVo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where "); 
        String andStr = " ";

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

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

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeSupplementaryNotesVoCollection voColl = DischargeSupplementaryNotesVoAssembler.createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:openmaxims-linux    文件:EDischargeImpl.java   
public DischargeSupplementaryNotesVo saveSupplementaryAndDD(DischargeSupplementaryNotesVo voDischSupp, DischargeDetailsVo voDD) throws DomainInterfaceException, StaleObjectException 
{
    if(voDischSupp == null)
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo is null");

    if(!voDischSupp.isValidated())
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeSupplementaryNotes doDSN = DischargeSupplementaryNotesVoAssembler.extractDischargeSupplementaryNotes(factory, voDischSupp);

    //WDEV-8813
    // Workaround for the case when 2 users save in the same time a new DischargeSupplementaryNotesVO
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case
    if (!voDischSupp.getID_DischargeSupplementaryNotesIsNotNull())
    {
        DischargeSupplementaryNotesVo voDischargeSupp = getSupplementary(voDischSupp.getCareContext());
        if (voDischargeSupp!=null)
        {
            throw new StaleObjectException(doDSN,"A DischargeSupplementaryNotesVo was already saved by another user");
        }
    }


    factory.save(doDSN);


    if (voDD != null)
    {
        DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDD);
        factory.save(doDD);
    }
    return DischargeSupplementaryNotesVoAssembler.create(doDSN);
}
项目:AvoinApotti    文件:EDischargeSTHKImpl.java   
public DischargeSupplementaryNotesVo saveSupplementaryAndDDAndSummary(DischargeSupplementaryNotesVo voDischSupp, DischargeDetailsVo voDD, EDischargeSTHKSummaryVo voSumm) throws DomainInterfaceException, StaleObjectException
{
    if(voDischSupp == null)
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo is null");

    if(!voDischSupp.isValidated())
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeSupplementaryNotes doDSN = DischargeSupplementaryNotesVoAssembler.extractDischargeSupplementaryNotes(factory, voDischSupp);

    //WDEV-8813
    // Workaround for the case when 2 users save in the same time a new DischargeSupplementaryNotesVO
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case
    if (!voDischSupp.getID_DischargeSupplementaryNotesIsNotNull())
    {
        DischargeSupplementaryNotesVo voDischargeSupp = getSupplementary(voDischSupp.getCareContext());
        if (voDischargeSupp!=null)
        {
            throw new StaleObjectException(doDSN,"A DischargeSupplementaryNotesVo was already saved by another user");
        }
    }


    factory.save(doDSN);


    if (voDD != null)
    {
        DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDD);
        factory.save(doDD);
    }

    if (voSumm != null)
    {
        Summary doSumm = EDischargeSTHKSummaryVoAssembler.extractSummary(factory, voSumm);
        factory.save(doSumm);
    }

    return DischargeSupplementaryNotesVoAssembler.create(doDSN);
}
项目:openMAXIMS    文件:EDischargeSTHKImpl.java   
public DischargeSupplementaryNotesVo saveSupplementaryAndDDAndSummary(DischargeSupplementaryNotesVo voDischSupp, DischargeDetailsVo voDD, EDischargeSTHKSummaryVo voSumm) throws DomainInterfaceException, StaleObjectException
{
    if(voDischSupp == null)
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo is null");

    if(!voDischSupp.isValidated())
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeSupplementaryNotes doDSN = DischargeSupplementaryNotesVoAssembler.extractDischargeSupplementaryNotes(factory, voDischSupp);

    //WDEV-8813
    // Workaround for the case when 2 users save in the same time a new DischargeSupplementaryNotesVO
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case
    if (!voDischSupp.getID_DischargeSupplementaryNotesIsNotNull())
    {
        DischargeSupplementaryNotesVo voDischargeSupp = getSupplementary(voDischSupp.getCareContext());
        if (voDischargeSupp!=null)
        {
            throw new StaleObjectException(doDSN,"A DischargeSupplementaryNotesVo was already saved by another user");
        }
    }


    factory.save(doDSN);


    if (voDD != null)
    {
        DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDD);
        factory.save(doDD);
    }

    if (voSumm != null)
    {
        Summary doSumm = EDischargeSTHKSummaryVoAssembler.extractSummary(factory, voSumm);
        factory.save(doSumm);
    }

    return DischargeSupplementaryNotesVoAssembler.create(doDSN);
}
项目:openMAXIMS    文件:EDischargeSTHKImpl.java   
public DischargeSupplementaryNotesVo saveSupplementaryAndDDAndSummary(DischargeSupplementaryNotesVo voDischSupp, DischargeDetailsVo voDD, EDischargeSTHKSummaryVo voSumm) throws DomainInterfaceException, StaleObjectException
{
    if(voDischSupp == null)
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo is null");

    if(!voDischSupp.isValidated())
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeSupplementaryNotes doDSN = DischargeSupplementaryNotesVoAssembler.extractDischargeSupplementaryNotes(factory, voDischSupp);

    //WDEV-8813
    // Workaround for the case when 2 users save in the same time a new DischargeSupplementaryNotesVO
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case
    if (!voDischSupp.getID_DischargeSupplementaryNotesIsNotNull())
    {
        DischargeSupplementaryNotesVo voDischargeSupp = getSupplementary(voDischSupp.getCareContext());
        if (voDischargeSupp!=null)
        {
            throw new StaleObjectException(doDSN,"A DischargeSupplementaryNotesVo was already saved by another user");
        }
    }


    factory.save(doDSN);


    if (voDD != null)
    {
        DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDD);
        factory.save(doDD);
    }

    if (voSumm != null)
    {
        Summary doSumm = EDischargeSTHKSummaryVoAssembler.extractSummary(factory, voSumm);
        factory.save(doSumm);
    }

    return DischargeSupplementaryNotesVoAssembler.create(doDSN);
}
项目:openmaxims-linux    文件:EDischargeSTHKImpl.java   
public DischargeSupplementaryNotesVo saveSupplementaryAndDDAndSummary(DischargeSupplementaryNotesVo voDischSupp, DischargeDetailsVo voDD, EDischargeSTHKSummaryVo voSumm) throws DomainInterfaceException, StaleObjectException
{
    if(voDischSupp == null)
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo is null");

    if(!voDischSupp.isValidated())
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeSupplementaryNotes doDSN = DischargeSupplementaryNotesVoAssembler.extractDischargeSupplementaryNotes(factory, voDischSupp);

    //WDEV-8813
    // Workaround for the case when 2 users save in the same time a new DischargeSupplementaryNotesVO
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case
    if (!voDischSupp.getID_DischargeSupplementaryNotesIsNotNull())
    {
        DischargeSupplementaryNotesVo voDischargeSupp = getSupplementary(voDischSupp.getCareContext());
        if (voDischargeSupp!=null)
        {
            throw new StaleObjectException(doDSN,"A DischargeSupplementaryNotesVo was already saved by another user");
        }
    }


    factory.save(doDSN);


    if (voDD != null)
    {
        DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDD);
        factory.save(doDD);
    }

    if (voSumm != null)
    {
        Summary doSumm = EDischargeSTHKSummaryVoAssembler.extractSummary(factory, voSumm);
        factory.save(doSumm);
    }

    return DischargeSupplementaryNotesVoAssembler.create(doDSN);
}