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

项目:AvoinApotti    文件:PlinthWorkImpl.java   
public PlinthWorkVo getPlinthWorkByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get PlinthWorkVo for null ClinicalContactRefVo");

    String hql = "from PlinthWork c where c.clinicalContact = :clinicalContact order by c.systemInformation.creationDateTime desc";   //wdev-13560  
    DomainFactory factory = getDomainFactory();
    List list =  factory.find(hql, new String[]{"clinicalContact"}, new Object[]{(ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef)});

    //List list = ims.therapies.treatment.domain.objects.PlinthWork.listPlinthWorkByClinicalContact(getDomainFactory(), (ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef));
    if (list == null || list.size() == 0)
        return null;
    //else if (list.size() > 1)
    //  throw new CodingRuntimeException("More than one Plinth Work found for the current Clinical Contact");

    PlinthWorkVoCollection coll = PlinthWorkVoAssembler.createPlinthWorkVoCollectionFromPlinthWork(list);

    if(coll!=null && coll.size()>0)
        return coll.get(0);

    return null;
}
项目:openMAXIMS    文件:PlinthWorkImpl.java   
public PlinthWorkVo getPlinthWorkByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get PlinthWorkVo for null ClinicalContactRefVo");

    String hql = "from PlinthWork c where c.clinicalContact = :clinicalContact order by c.systemInformation.creationDateTime desc";   //wdev-13560  
    DomainFactory factory = getDomainFactory();
    List list =  factory.find(hql, new String[]{"clinicalContact"}, new Object[]{(ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef)});

    //List list = ims.therapies.treatment.domain.objects.PlinthWork.listPlinthWorkByClinicalContact(getDomainFactory(), (ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef));
    if (list == null || list.size() == 0)
        return null;
    //else if (list.size() > 1)
    //  throw new CodingRuntimeException("More than one Plinth Work found for the current Clinical Contact");

    PlinthWorkVoCollection coll = PlinthWorkVoAssembler.createPlinthWorkVoCollectionFromPlinthWork(list);

    if(coll!=null && coll.size()>0)
        return coll.get(0);

    return null;
}
项目:openMAXIMS    文件:PlinthWorkImpl.java   
public PlinthWorkVo getPlinthWorkByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get PlinthWorkVo for null ClinicalContactRefVo");

    String hql = "from PlinthWork c where c.clinicalContact = :clinicalContact order by c.systemInformation.creationDateTime desc";   //wdev-13560  
    DomainFactory factory = getDomainFactory();
    List list =  factory.find(hql, new String[]{"clinicalContact"}, new Object[]{(ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef)});

    //List list = ims.therapies.treatment.domain.objects.PlinthWork.listPlinthWorkByClinicalContact(getDomainFactory(), (ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef));
    if (list == null || list.size() == 0)
        return null;
    //else if (list.size() > 1)
    //  throw new CodingRuntimeException("More than one Plinth Work found for the current Clinical Contact");

    PlinthWorkVoCollection coll = PlinthWorkVoAssembler.createPlinthWorkVoCollectionFromPlinthWork(list);

    if(coll!=null && coll.size()>0)
        return coll.get(0);

    return null;
}
项目:openmaxims-linux    文件:PlinthWorkImpl.java   
public PlinthWorkVo getPlinthWorkByClinicalContact(ClinicalContactRefVo voClinicalContactRef)
{
    if (voClinicalContactRef == null)
        throw new RuntimeException("Cannot get PlinthWorkVo for null ClinicalContactRefVo");

    String hql = "from PlinthWork c where c.clinicalContact = :clinicalContact order by c.systemInformation.creationDateTime desc";   //wdev-13560  
    DomainFactory factory = getDomainFactory();
    List list =  factory.find(hql, new String[]{"clinicalContact"}, new Object[]{(ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef)});

    //List list = ims.therapies.treatment.domain.objects.PlinthWork.listPlinthWorkByClinicalContact(getDomainFactory(), (ClinicalContact) getDomainFactory().getDomainObject(voClinicalContactRef));
    if (list == null || list.size() == 0)
        return null;
    //else if (list.size() > 1)
    //  throw new CodingRuntimeException("More than one Plinth Work found for the current Clinical Contact");

    PlinthWorkVoCollection coll = PlinthWorkVoAssembler.createPlinthWorkVoCollectionFromPlinthWork(list);

    if(coll!=null && coll.size()>0)
        return coll.get(0);

    return null;
}