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

项目:AvoinApotti    文件:StrengtheningProgramImpl.java   
public StrengtheningProgramShortVoCollection listStrengthProgByCareContext(CareContextRefVo voCareContextRefVo) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from StrengtheningProgram sp ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

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

    List skills = factory.find(query, markers, values); 
    StrengtheningProgramShortVoCollection voStrengtheningProgramShortColl = StrengtheningProgramShortVoAssembler.createStrengtheningProgramShortVoCollectionFromStrengtheningProgram(skills);
    if(voStrengtheningProgramShortColl != null && voStrengtheningProgramShortColl.size()>0)
        return voStrengtheningProgramShortColl;

    return null;
}
项目:openMAXIMS    文件:StrengtheningProgramImpl.java   
public StrengtheningProgramShortVoCollection listStrengthProgByCareContext(CareContextRefVo voCareContextRefVo) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from StrengtheningProgram sp ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

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

    List skills = factory.find(query, markers, values); 
    StrengtheningProgramShortVoCollection voStrengtheningProgramShortColl = StrengtheningProgramShortVoAssembler.createStrengtheningProgramShortVoCollectionFromStrengtheningProgram(skills);
    if(voStrengtheningProgramShortColl != null && voStrengtheningProgramShortColl.size()>0)
        return voStrengtheningProgramShortColl;

    return null;
}
项目:openMAXIMS    文件:StrengtheningProgramImpl.java   
public StrengtheningProgramShortVoCollection listStrengthProgByCareContext(CareContextRefVo voCareContextRefVo) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from StrengtheningProgram sp ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

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

    List skills = factory.find(query, markers, values); 
    StrengtheningProgramShortVoCollection voStrengtheningProgramShortColl = StrengtheningProgramShortVoAssembler.createStrengtheningProgramShortVoCollectionFromStrengtheningProgram(skills);
    if(voStrengtheningProgramShortColl != null && voStrengtheningProgramShortColl.size()>0)
        return voStrengtheningProgramShortColl;

    return null;
}
项目:openmaxims-linux    文件:StrengtheningProgramImpl.java   
public StrengtheningProgramShortVoCollection listStrengthProgByCareContext(CareContextRefVo voCareContextRefVo) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from StrengtheningProgram sp ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

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

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

    List skills = factory.find(query, markers, values); 
    StrengtheningProgramShortVoCollection voStrengtheningProgramShortColl = StrengtheningProgramShortVoAssembler.createStrengtheningProgramShortVoCollectionFromStrengtheningProgram(skills);
    if(voStrengtheningProgramShortColl != null && voStrengtheningProgramShortColl.size()>0)
        return voStrengtheningProgramShortColl;

    return null;
}