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

项目:AvoinApotti    文件:RehabImpl.java   
/**
* Get the current Rehab record for the Clinical Contact 
*/
public ims.therapies.vo.RehabilitationVo getRehabVo(ims.core.vo.ClinicalContactShortVo voClinicalContactShort)
{
    RehabilitationVoCollection voRehabColl  = new RehabilitationVoCollection();

    DomainFactory factory = getDomainFactory();

    String hql = " from Rehabilitation rehab "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(voClinicalContactShort !=null)
    {
        condStr.append(andStr + " rehab.clinicalContact.id = :id_ClinicalContact"); 
        markers.add("id_ClinicalContact");
        values.add(voClinicalContactShort.getID_ClinicalContact());
        andStr = " and ";
    }   

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    voRehabColl = RehabilitationVoAssembler.createRehabilitationVoCollectionFromRehabilitation(factory.find(hql, markers, values));
    if(voRehabColl.size()>0)
        return voRehabColl.get(0);
    else 
        return null;        
}
项目:openMAXIMS    文件:RehabImpl.java   
/**
* Get the current Rehab record for the Clinical Contact 
*/
public ims.therapies.vo.RehabilitationVo getRehabVo(ims.core.vo.ClinicalContactShortVo voClinicalContactShort)
{
    RehabilitationVoCollection voRehabColl  = new RehabilitationVoCollection();

    DomainFactory factory = getDomainFactory();

    String hql = " from Rehabilitation rehab "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(voClinicalContactShort !=null)
    {
        condStr.append(andStr + " rehab.clinicalContact.id = :id_ClinicalContact"); 
        markers.add("id_ClinicalContact");
        values.add(voClinicalContactShort.getID_ClinicalContact());
        andStr = " and ";
    }   

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    voRehabColl = RehabilitationVoAssembler.createRehabilitationVoCollectionFromRehabilitation(factory.find(hql, markers, values));
    if(voRehabColl.size()>0)
        return voRehabColl.get(0);
    else 
        return null;        
}
项目:openMAXIMS    文件:RehabImpl.java   
/**
* Get the current Rehab record for the Clinical Contact 
*/
public ims.therapies.vo.RehabilitationVo getRehabVo(ims.core.vo.ClinicalContactShortVo voClinicalContactShort)
{
    RehabilitationVoCollection voRehabColl  = new RehabilitationVoCollection();

    DomainFactory factory = getDomainFactory();

    String hql = " from Rehabilitation rehab "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(voClinicalContactShort !=null)
    {
        condStr.append(andStr + " rehab.clinicalContact.id = :id_ClinicalContact"); 
        markers.add("id_ClinicalContact");
        values.add(voClinicalContactShort.getID_ClinicalContact());
        andStr = " and ";
    }   

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    voRehabColl = RehabilitationVoAssembler.createRehabilitationVoCollectionFromRehabilitation(factory.find(hql, markers, values));
    if(voRehabColl.size()>0)
        return voRehabColl.get(0);
    else 
        return null;        
}
项目:openmaxims-linux    文件:RehabImpl.java   
/**
* Get the current Rehab record for the Clinical Contact 
*/
public ims.therapies.vo.RehabilitationVo getRehabVo(ims.core.vo.ClinicalContactShortVo voClinicalContactShort)
{
    RehabilitationVoCollection voRehabColl  = new RehabilitationVoCollection();

    DomainFactory factory = getDomainFactory();

    String hql = " from Rehabilitation rehab "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " ";

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    if(voClinicalContactShort !=null)
    {
        condStr.append(andStr + " rehab.clinicalContact.id = :id_ClinicalContact"); 
        markers.add("id_ClinicalContact");
        values.add(voClinicalContactShort.getID_ClinicalContact());
        andStr = " and ";
    }   

    if (andStr.equals(" and "))
        hql += " where ";

    hql += condStr.toString();
    voRehabColl = RehabilitationVoAssembler.createRehabilitationVoCollectionFromRehabilitation(factory.find(hql, markers, values));
    if(voRehabColl.size()>0)
        return voRehabColl.get(0);
    else 
        return null;        
}