Java 类ims.therapies.vo.WheelchairSkillsVoCollection 实例源码

项目:AvoinApotti    文件:WheelchairSkillsImpl.java   
public WheelchairSkillsVo getWheelchairSkillsByClinicalContact(ClinicalContactRefVo voClinicalContactRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from WheelchairSkills w ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voClinicalContactRef != null)
    {
        hql.append(andStr + " w.clinicalContact.id = :id_ClinicalContact");
        markers.add("id_ClinicalContact");
        values.add(voClinicalContactRef.getID_ClinicalContact());           
        andStr = " and ";
    }

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

    query += " order by w.id desc";         //wdev-13637
    List skills = factory.find(query, markers, values); 
    WheelchairSkillsVoCollection collWheelchairSkillsVo = WheelchairSkillsVoAssembler.createWheelchairSkillsVoCollectionFromWheelchairSkills(skills);
    if(collWheelchairSkillsVo!=null && collWheelchairSkillsVo.size()>0)
        return collWheelchairSkillsVo.get(0);

    return null;
}
项目:openMAXIMS    文件:WheelchairSkillsImpl.java   
public WheelchairSkillsVo getWheelchairSkillsByClinicalContact(ClinicalContactRefVo voClinicalContactRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from WheelchairSkills w ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voClinicalContactRef != null)
    {
        hql.append(andStr + " w.clinicalContact.id = :id_ClinicalContact");
        markers.add("id_ClinicalContact");
        values.add(voClinicalContactRef.getID_ClinicalContact());           
        andStr = " and ";
    }

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

    query += " order by w.id desc";         //wdev-13637
    List skills = factory.find(query, markers, values); 
    WheelchairSkillsVoCollection collWheelchairSkillsVo = WheelchairSkillsVoAssembler.createWheelchairSkillsVoCollectionFromWheelchairSkills(skills);
    if(collWheelchairSkillsVo!=null && collWheelchairSkillsVo.size()>0)
        return collWheelchairSkillsVo.get(0);

    return null;
}
项目:openMAXIMS    文件:WheelchairSkillsImpl.java   
public WheelchairSkillsVo getWheelchairSkillsByClinicalContact(ClinicalContactRefVo voClinicalContactRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from WheelchairSkills w ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voClinicalContactRef != null)
    {
        hql.append(andStr + " w.clinicalContact.id = :id_ClinicalContact");
        markers.add("id_ClinicalContact");
        values.add(voClinicalContactRef.getID_ClinicalContact());           
        andStr = " and ";
    }

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

    query += " order by w.id desc";         //wdev-13637
    List skills = factory.find(query, markers, values); 
    WheelchairSkillsVoCollection collWheelchairSkillsVo = WheelchairSkillsVoAssembler.createWheelchairSkillsVoCollectionFromWheelchairSkills(skills);
    if(collWheelchairSkillsVo!=null && collWheelchairSkillsVo.size()>0)
        return collWheelchairSkillsVo.get(0);

    return null;
}
项目:openmaxims-linux    文件:WheelchairSkillsImpl.java   
public WheelchairSkillsVo getWheelchairSkillsByClinicalContact(ClinicalContactRefVo voClinicalContactRef) 
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" ");
    String query = "from WheelchairSkills w ";
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();
    String andStr = " ";

    if (voClinicalContactRef != null)
    {
        hql.append(andStr + " w.clinicalContact.id = :id_ClinicalContact");
        markers.add("id_ClinicalContact");
        values.add(voClinicalContactRef.getID_ClinicalContact());           
        andStr = " and ";
    }

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

    query += " order by w.id desc";         //wdev-13637
    List skills = factory.find(query, markers, values); 
    WheelchairSkillsVoCollection collWheelchairSkillsVo = WheelchairSkillsVoAssembler.createWheelchairSkillsVoCollectionFromWheelchairSkills(skills);
    if(collWheelchairSkillsVo!=null && collWheelchairSkillsVo.size()>0)
        return collWheelchairSkillsVo.get(0);

    return null;
}