Java 类ims.nursing.vo.RepositioningPlanVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void populateListControl(RepositioningPlanVoCollection voRepositioningPlanColl) 
{
    if(voRepositioningPlanColl == null) return;

    for(int i=0; i<voRepositioningPlanColl.size(); i++)
    {
        RepositioningPlanVo voRepositioningPlan = voRepositioningPlanColl.get(i);
        GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow();
        if(voRepositioningPlan.getAuthoringInformation() != null)
        {
            AuthoringInformationVo voInfo = voRepositioningPlan.getAuthoringInformation();
            String authoringInfo = "";
            if(voInfo.getAuthoringDateTimeIsNotNull())
                authoringInfo += voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime().toString();
            if(voInfo.getAuthoringHcpIsNotNull())
                authoringInfo += " - " + voRepositioningPlan.getAuthoringInformation().getAuthoringHcp().toString();
            row.setColDateTime(authoringInfo);
        }
        if(voRepositioningPlan.getPositioningFreqIsNotNull())
            row.setColFrequency(voRepositioningPlan.getPositioningFreq().toString());
        if(voRepositioningPlan.getBlanchingIsNotNull())
            row.setColBlanching(voRepositioningPlan.getBlanching().toString());
        row.setColSides(getPosition(voRepositioningPlan.getPosition()));
        row.setColSkinTest(voRepositioningPlan.getSkinToleranceTest());

        row.setValue(voRepositioningPlan);
    }

    if(voRepositioningPlanColl != null && voRepositioningPlanColl.size() != 0)
        form.getLocalContext().setpreviousRepositioningPlan(voRepositioningPlanColl.get(0));
}
项目:AvoinApotti    文件:RepositioningPlanImpl.java   
public RepositioningPlanVoCollection listRepositioningPlanByCareContext(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from RepositioningPlan rp";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
        andStr = " and ";
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc");

    if (markers.size() > 0) query += " where ";
    query += hql.toString();

    List plan = factory.find(query, markers, values);   
    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null)
        return collRepositioningPlanVo.sort(SortOrder.DESCENDING);

    return null;
}
项目:AvoinApotti    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from RepositioningPlan rp ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(" where ");
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc ");

    List plan = factory.find(hql.toString(), markers, values);  
    if(plan != null && plan.size() > 1)
    {
        Object firstItem = plan.get(0);
        plan.removeAll(plan);
        plan.add(firstItem);
    }

    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null && collRepositioningPlanVo.size() > 0)
        return collRepositioningPlanVo.get(0);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateListControl(RepositioningPlanVoCollection voRepositioningPlanColl) 
{
    if(voRepositioningPlanColl == null) return;

    for(int i=0; i<voRepositioningPlanColl.size(); i++)
    {
        RepositioningPlanVo voRepositioningPlan = voRepositioningPlanColl.get(i);
        GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow();
        if(voRepositioningPlan.getAuthoringInformation() != null)
        {
            AuthoringInformationVo voInfo = voRepositioningPlan.getAuthoringInformation();
            String authoringInfo = "";
            if(voInfo.getAuthoringDateTimeIsNotNull())
                authoringInfo += voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime().toString();
            if(voInfo.getAuthoringHcpIsNotNull())
                authoringInfo += " - " + voRepositioningPlan.getAuthoringInformation().getAuthoringHcp().toString();
            row.setColDateTime(authoringInfo);
        }
        if(voRepositioningPlan.getPositioningFreqIsNotNull())
            row.setColFrequency(voRepositioningPlan.getPositioningFreq().toString());
        if(voRepositioningPlan.getBlanchingIsNotNull())
            row.setColBlanching(voRepositioningPlan.getBlanching().toString());
        row.setColSides(getPosition(voRepositioningPlan.getPosition()));
        row.setColSkinTest(voRepositioningPlan.getSkinToleranceTest());

        row.setValue(voRepositioningPlan);
    }

    if(voRepositioningPlanColl != null && voRepositioningPlanColl.size() != 0)
        form.getLocalContext().setpreviousRepositioningPlan(voRepositioningPlanColl.get(0));
}
项目:openMAXIMS    文件:RepositioningPlanImpl.java   
public RepositioningPlanVoCollection listRepositioningPlanByCareContext(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from RepositioningPlan rp";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
        andStr = " and ";
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc");

    if (markers.size() > 0) query += " where ";
    query += hql.toString();

    List plan = factory.find(query, markers, values);   
    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null)
        return collRepositioningPlanVo.sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from RepositioningPlan rp ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(" where ");
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc ");

    List plan = factory.find(hql.toString(), markers, values);  
    if(plan != null && plan.size() > 1)
    {
        Object firstItem = plan.get(0);
        plan.removeAll(plan);
        plan.add(firstItem);
    }

    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null && collRepositioningPlanVo.size() > 0)
        return collRepositioningPlanVo.get(0);

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateListControl(RepositioningPlanVoCollection voRepositioningPlanColl) 
{
    if(voRepositioningPlanColl == null) return;

    for(int i=0; i<voRepositioningPlanColl.size(); i++)
    {
        RepositioningPlanVo voRepositioningPlan = voRepositioningPlanColl.get(i);
        GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow();
        if(voRepositioningPlan.getAuthoringInformation() != null)
        {
            AuthoringInformationVo voInfo = voRepositioningPlan.getAuthoringInformation();
            String authoringInfo = "";
            if(voInfo.getAuthoringDateTimeIsNotNull())
                authoringInfo += voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime().toString();
            if(voInfo.getAuthoringHcpIsNotNull())
                authoringInfo += " - " + voRepositioningPlan.getAuthoringInformation().getAuthoringHcp().toString();
            row.setColDateTime(authoringInfo);
        }
        if(voRepositioningPlan.getPositioningFreqIsNotNull())
            row.setColFrequency(voRepositioningPlan.getPositioningFreq().toString());
        if(voRepositioningPlan.getBlanchingIsNotNull())
            row.setColBlanching(voRepositioningPlan.getBlanching().toString());
        row.setColSides(getPosition(voRepositioningPlan.getPosition()));
        row.setColSkinTest(voRepositioningPlan.getSkinToleranceTest());

        row.setValue(voRepositioningPlan);
    }

    if(voRepositioningPlanColl != null && voRepositioningPlanColl.size() != 0)
        form.getLocalContext().setpreviousRepositioningPlan(voRepositioningPlanColl.get(0));
}
项目:openMAXIMS    文件:RepositioningPlanImpl.java   
public RepositioningPlanVoCollection listRepositioningPlanByCareContext(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from RepositioningPlan rp";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
        andStr = " and ";
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc");

    if (markers.size() > 0) query += " where ";
    query += hql.toString();

    List plan = factory.find(query, markers, values);   
    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null)
        return collRepositioningPlanVo.sort(SortOrder.DESCENDING);

    return null;
}
项目:openMAXIMS    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from RepositioningPlan rp ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(" where ");
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc ");

    List plan = factory.find(hql.toString(), markers, values);  
    if(plan != null && plan.size() > 1)
    {
        Object firstItem = plan.get(0);
        plan.removeAll(plan);
        plan.add(firstItem);
    }

    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null && collRepositioningPlanVo.size() > 0)
        return collRepositioningPlanVo.get(0);

    return null;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateListControl(RepositioningPlanVoCollection voRepositioningPlanColl) 
{
    if(voRepositioningPlanColl == null) return;

    for(int i=0; i<voRepositioningPlanColl.size(); i++)
    {
        RepositioningPlanVo voRepositioningPlan = voRepositioningPlanColl.get(i);
        GenForm.grdDetailsRow row = form.grdDetails().getRows().newRow();
        if(voRepositioningPlan.getAuthoringInformation() != null)
        {
            AuthoringInformationVo voInfo = voRepositioningPlan.getAuthoringInformation();
            String authoringInfo = "";
            if(voInfo.getAuthoringDateTimeIsNotNull())
                authoringInfo += voRepositioningPlan.getAuthoringInformation().getAuthoringDateTime().toString();
            if(voInfo.getAuthoringHcpIsNotNull())
                authoringInfo += " - " + voRepositioningPlan.getAuthoringInformation().getAuthoringHcp().toString();
            row.setColDateTime(authoringInfo);
        }
        if(voRepositioningPlan.getPositioningFreqIsNotNull())
            row.setColFrequency(voRepositioningPlan.getPositioningFreq().toString());
        if(voRepositioningPlan.getBlanchingIsNotNull())
            row.setColBlanching(voRepositioningPlan.getBlanching().toString());
        row.setColSides(getPosition(voRepositioningPlan.getPosition()));
        row.setColSkinTest(voRepositioningPlan.getSkinToleranceTest());

        row.setValue(voRepositioningPlan);
    }

    if(voRepositioningPlanColl != null && voRepositioningPlanColl.size() != 0)
        form.getLocalContext().setpreviousRepositioningPlan(voRepositioningPlanColl.get(0));
}
项目:openmaxims-linux    文件:RepositioningPlanImpl.java   
public RepositioningPlanVoCollection listRepositioningPlanByCareContext(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from RepositioningPlan rp";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
        andStr = " and ";
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc");

    if (markers.size() > 0) query += " where ";
    query += hql.toString();

    List plan = factory.find(query, markers, values);   
    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null)
        return collRepositioningPlanVo.sort(SortOrder.DESCENDING);

    return null;
}
项目:openmaxims-linux    文件:RepositioningPlanImpl.java   
public RepositioningPlanVo getLastCompletedRepositioningPlan(CareContextRefVo voCareContextRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from RepositioningPlan rp ");
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voCareContextRef != null)
    {
        hql.append(" where ");
        hql.append(andStr + " rp.careContext.id = :id_CareContext");
        markers.add("id_CareContext");
        values.add(voCareContextRef.getID_CareContext());           
    }

    hql.append(" order by rp.authoringInformation.authoringDateTime desc ");

    List plan = factory.find(hql.toString(), markers, values);  
    if(plan != null && plan.size() > 1)
    {
        Object firstItem = plan.get(0);
        plan.removeAll(plan);
        plan.add(firstItem);
    }

    RepositioningPlanVoCollection collRepositioningPlanVo = RepositioningPlanVoAssembler.createRepositioningPlanVoCollectionFromRepositioningPlan(plan);
    if(collRepositioningPlanVo != null && collRepositioningPlanVo.size() > 0)
        return collRepositioningPlanVo.get(0);

    return null;
}