Java 类ims.therapies.vo.domain.EnvironmentalVisitShortVoAssembler 实例源码

项目:AvoinApotti    文件:EnvironmentalVisitImpl.java   
public EnvironmentalVisitShortVoCollection getEnvironmentalVisitByCareContext(CareContextRefVo voCareContextRefVo)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from EnvironmentalVisit ev ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

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


    List visit = factory.find(query, markers, values);  
    EnvironmentalVisitShortVoCollection collEnvironmentalVisitShortVo = EnvironmentalVisitShortVoAssembler.createEnvironmentalVisitShortVoCollectionFromEnvironmentalVisit(visit);
    if(collEnvironmentalVisitShortVo != null)
        return collEnvironmentalVisitShortVo.sort();

    return null;
}
项目:openMAXIMS    文件:EnvironmentalVisitImpl.java   
public EnvironmentalVisitShortVoCollection getEnvironmentalVisitByCareContext(CareContextRefVo voCareContextRefVo)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from EnvironmentalVisit ev ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

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


    List visit = factory.find(query, markers, values);  
    EnvironmentalVisitShortVoCollection collEnvironmentalVisitShortVo = EnvironmentalVisitShortVoAssembler.createEnvironmentalVisitShortVoCollectionFromEnvironmentalVisit(visit);
    if(collEnvironmentalVisitShortVo != null)
        return collEnvironmentalVisitShortVo.sort();

    return null;
}
项目:openMAXIMS    文件:EnvironmentalVisitImpl.java   
public EnvironmentalVisitShortVoCollection getEnvironmentalVisitByCareContext(CareContextRefVo voCareContextRefVo)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from EnvironmentalVisit ev ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

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


    List visit = factory.find(query, markers, values);  
    EnvironmentalVisitShortVoCollection collEnvironmentalVisitShortVo = EnvironmentalVisitShortVoAssembler.createEnvironmentalVisitShortVoCollectionFromEnvironmentalVisit(visit);
    if(collEnvironmentalVisitShortVo != null)
        return collEnvironmentalVisitShortVo.sort();

    return null;
}
项目:openmaxims-linux    文件:EnvironmentalVisitImpl.java   
public EnvironmentalVisitShortVoCollection getEnvironmentalVisitByCareContext(CareContextRefVo voCareContextRefVo)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from EnvironmentalVisit ev ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

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


    List visit = factory.find(query, markers, values);  
    EnvironmentalVisitShortVoCollection collEnvironmentalVisitShortVo = EnvironmentalVisitShortVoAssembler.createEnvironmentalVisitShortVoCollectionFromEnvironmentalVisit(visit);
    if(collEnvironmentalVisitShortVo != null)
        return collEnvironmentalVisitShortVo.sort();

    return null;
}