Java 类ims.emergency.vo.domain.SentToXrayVoAssembler 实例源码

项目:AvoinApotti    文件:SendToXRayImpl.java   
public SentToXrayVoCollection getAllSentToXRay(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SentToXrayVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSentToXRay from SentToXray as allSentToXRay where allSentToXRay.attendance.id = :attID order by allSentToXRay.sentDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] {"attID"}, new Object[] {careContextRef.getID_CareContext()});

    return SentToXrayVoAssembler.createSentToXrayVoCollectionFromSentToXray(list);  
}
项目:AvoinApotti    文件:SendToXRayImpl.java   
public SentToXrayVo save(SentToXrayVo sentToXRayToSave, TrackingForSendToXRayVo tracking) throws StaleObjectException
{
    if (sentToXRayToSave == null)
        throw new CodingRuntimeException("Cannot save null SentToXRay ");

    if (!sentToXRayToSave.isValidated())
        throw new DomainRuntimeException("SentToXrayVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    SentToXray domainSentToXRay = SentToXrayVoAssembler.extractSentToXray(factory, sentToXRayToSave);

    factory.save(domainSentToXRay);

    if (tracking!=null)
    {
        if (!tracking.isValidated())
            throw new DomainRuntimeException("TrackingForAllocatedMedicVo Not Validated.");

        Tracking domainTracking = TrackingForSendToXRayVoAssembler.extractTracking(factory, tracking);

        factory.save(domainTracking);
    }

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:AvoinApotti    文件:SendToXRayImpl.java   
public Boolean isMostRecentRecordReturned(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get AllocatedMedicVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSentToXRay from SentToXray as allSentToXRay where allSentToXRay.attendance.id = :attID order by allSentToXRay.sentDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] {"attID"}, new Object[] {careContextRef.getID_CareContext()});     

    if (list.size()>0)
    {
        SentToXrayVo lastRec = SentToXrayVoAssembler.createSentToXrayVoCollectionFromSentToXray(list).get(0);
        if (lastRec.getReturnedDateTimeIsNotNull())
            return true;
        else
            return false;
    }
    else
        return true;
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public SentToXrayVoCollection getAllSentToXRay(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SentToXrayVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSentToXRay from SentToXray as allSentToXRay where allSentToXRay.attendance.id = :attID order by allSentToXRay.sentDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] {"attID"}, new Object[] {careContextRef.getID_CareContext()});

    return SentToXrayVoAssembler.createSentToXrayVoCollectionFromSentToXray(list);  
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public SentToXrayVo save(SentToXrayVo sentToXRayToSave, TrackingForSendToXRayVo tracking) throws StaleObjectException
{
    if (sentToXRayToSave == null)
        throw new CodingRuntimeException("Cannot save null SentToXRay ");

    if (!sentToXRayToSave.isValidated())
        throw new DomainRuntimeException("SentToXrayVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    SentToXray domainSentToXRay = SentToXrayVoAssembler.extractSentToXray(factory, sentToXRayToSave);

    factory.save(domainSentToXRay);

    if (tracking!=null)
    {
        if (!tracking.isValidated())
            throw new DomainRuntimeException("TrackingForAllocatedMedicVo Not Validated.");

        Tracking domainTracking = TrackingForSendToXRayVoAssembler.extractTracking(factory, tracking);

        factory.save(domainTracking);
    }

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public Boolean isMostRecentRecordReturned(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get AllocatedMedicVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSentToXRay from SentToXray as allSentToXRay where allSentToXRay.attendance.id = :attID order by allSentToXRay.sentDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] {"attID"}, new Object[] {careContextRef.getID_CareContext()});     

    if (list.size()>0)
    {
        SentToXrayVo lastRec = SentToXrayVoAssembler.createSentToXrayVoCollectionFromSentToXray(list).get(0);
        if (lastRec.getReturnedDateTimeIsNotNull())
            return true;
        else
            return false;
    }
    else
        return true;
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public SentToXrayVoCollection getAllSentToXRay(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SentToXrayVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSentToXRay from SentToXray as allSentToXRay where allSentToXRay.attendance.id = :attID order by allSentToXRay.sentDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] {"attID"}, new Object[] {careContextRef.getID_CareContext()});

    return SentToXrayVoAssembler.createSentToXrayVoCollectionFromSentToXray(list);  
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public SentToXrayVo save(SentToXrayVo sentToXRayToSave, TrackingForSendToXRayVo tracking) throws StaleObjectException
{
    if (sentToXRayToSave == null)
        throw new CodingRuntimeException("Cannot save null SentToXRay ");

    if (!sentToXRayToSave.isValidated())
        throw new DomainRuntimeException("SentToXrayVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    SentToXray domainSentToXRay = SentToXrayVoAssembler.extractSentToXray(factory, sentToXRayToSave);

    factory.save(domainSentToXRay);

    if (tracking!=null)
    {
        if (!tracking.isValidated())
            throw new DomainRuntimeException("TrackingForAllocatedMedicVo Not Validated.");

        Tracking domainTracking = TrackingForSendToXRayVoAssembler.extractTracking(factory, tracking);

        factory.save(domainTracking);
    }

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public Boolean isMostRecentRecordReturned(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get AllocatedMedicVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSentToXRay from SentToXray as allSentToXRay where allSentToXRay.attendance.id = :attID order by allSentToXRay.sentDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] {"attID"}, new Object[] {careContextRef.getID_CareContext()});     

    if (list.size()>0)
    {
        SentToXrayVo lastRec = SentToXrayVoAssembler.createSentToXrayVoCollectionFromSentToXray(list).get(0);
        if (lastRec.getReturnedDateTimeIsNotNull())
            return true;
        else
            return false;
    }
    else
        return true;
}
项目:openmaxims-linux    文件:SendToXRayImpl.java   
public SentToXrayVoCollection getAllSentToXRay(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get SentToXrayVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSentToXRay from SentToXray as allSentToXRay where allSentToXRay.attendance.id = :attID order by allSentToXRay.sentDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] {"attID"}, new Object[] {careContextRef.getID_CareContext()});

    return SentToXrayVoAssembler.createSentToXrayVoCollectionFromSentToXray(list);  
}
项目:openmaxims-linux    文件:SendToXRayImpl.java   
public SentToXrayVo save(SentToXrayVo sentToXRayToSave, TrackingForSendToXRayVo tracking) throws StaleObjectException
{
    if (sentToXRayToSave == null)
        throw new CodingRuntimeException("Cannot save null SentToXRay ");

    if (!sentToXRayToSave.isValidated())
        throw new DomainRuntimeException("SentToXrayVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    SentToXray domainSentToXRay = SentToXrayVoAssembler.extractSentToXray(factory, sentToXRayToSave);

    factory.save(domainSentToXRay);

    if (tracking!=null)
    {
        if (!tracking.isValidated())
            throw new DomainRuntimeException("TrackingForAllocatedMedicVo Not Validated.");

        Tracking domainTracking = TrackingForSendToXRayVoAssembler.extractTracking(factory, tracking);

        factory.save(domainTracking);
    }

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openmaxims-linux    文件:SendToXRayImpl.java   
public Boolean isMostRecentRecordReturned(CareContextRefVo careContextRef)
{
    if (careContextRef == null || careContextRef.getID_CareContext() == null)
    {
        throw new CodingRuntimeException("Cannot get AllocatedMedicVoCollection on null Id for CareContext ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select allSentToXRay from SentToXray as allSentToXRay where allSentToXRay.attendance.id = :attID order by allSentToXRay.sentDateTime desc ");

    List<?> list = factory.find(hql.toString(), new String[] {"attID"}, new Object[] {careContextRef.getID_CareContext()});     

    if (list.size()>0)
    {
        SentToXrayVo lastRec = SentToXrayVoAssembler.createSentToXrayVoCollectionFromSentToXray(list).get(0);
        if (lastRec.getReturnedDateTimeIsNotNull())
            return true;
        else
            return false;
    }
    else
        return true;
}
项目:AvoinApotti    文件:SendToXRayImpl.java   
public SentToXrayVo getSentToXRay(SentToXrayRefVo sentToXRay)
{
    if (sentToXRay == null || sentToXRay.getID_SentToXray() == null)
    {
        throw new CodingRuntimeException("Cannot get SentToXrayVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    SentToXray domainSentToXRay = (SentToXray) factory.getDomainObject(SentToXray.class, sentToXRay.getID_SentToXray());

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:AvoinApotti    文件:SendToXRayImpl.java   
public SentToXrayVo save(SentToXrayVo sentToXRayToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (sentToXRayToSave == null)
        throw new CodingRuntimeException("Cannot save null SentToXRay ");

    if (!sentToXRayToSave.isValidated())
        throw new DomainRuntimeException("SentToXrayVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    SentToXray domainSentToXRay = SentToXrayVoAssembler.extractSentToXray(factory, sentToXRayToSave);

    factory.save(domainSentToXRay);

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public SentToXrayVo getSentToXRay(SentToXrayRefVo sentToXRay)
{
    if (sentToXRay == null || sentToXRay.getID_SentToXray() == null)
    {
        throw new CodingRuntimeException("Cannot get SentToXrayVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    SentToXray domainSentToXRay = (SentToXray) factory.getDomainObject(SentToXray.class, sentToXRay.getID_SentToXray());

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public SentToXrayVo save(SentToXrayVo sentToXRayToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (sentToXRayToSave == null)
        throw new CodingRuntimeException("Cannot save null SentToXRay ");

    if (!sentToXRayToSave.isValidated())
        throw new DomainRuntimeException("SentToXrayVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    SentToXray domainSentToXRay = SentToXrayVoAssembler.extractSentToXray(factory, sentToXRayToSave);

    factory.save(domainSentToXRay);

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openMAXIMS    文件:AmentAttendanceSentToXrayTimesImpl.java   
public ims.emergency.vo.SentToXrayVo get(ims.emergency.vo.SentToXrayRefVo sentToXrayRef)
{
    if(sentToXrayRef == null || sentToXrayRef.getID_SentToXray() == null)
        return null;

    SentToXray doSentToXray = (SentToXray) getDomainFactory().getDomainObject(SentToXray.class, sentToXrayRef.getID_SentToXray());

    return SentToXrayVoAssembler.create(doSentToXray);
}
项目:openMAXIMS    文件:EmergencyAttendanceTimeAmendmentsImpl.java   
public SentToXrayVoCollection listSentToXray(CareContextRefVo careContextRef)
{
    if(careContextRef == null || careContextRef.getID_CareContext() == null)
        return null;

    String query = "select sx from SentToXray as sx left join sx.attendance as cc where cc.id = :CareContextId order by sx.systemInformation.creationDateTime desc";
    List<?> list = getDomainFactory().find(query, new String[] {"CareContextId"}, new Object[] {careContextRef.getID_CareContext()});

    return SentToXrayVoAssembler.createSentToXrayVoCollectionFromSentToXray(list);
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public SentToXrayVo getSentToXRay(SentToXrayRefVo sentToXRay)
{
    if (sentToXRay == null || sentToXRay.getID_SentToXray() == null)
    {
        throw new CodingRuntimeException("Cannot get SentToXrayVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    SentToXray domainSentToXRay = (SentToXray) factory.getDomainObject(SentToXray.class, sentToXRay.getID_SentToXray());

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public SentToXrayVo save(SentToXrayVo sentToXRayToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (sentToXRayToSave == null)
        throw new CodingRuntimeException("Cannot save null SentToXRay ");

    if (!sentToXRayToSave.isValidated())
        throw new DomainRuntimeException("SentToXrayVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    SentToXray domainSentToXRay = SentToXrayVoAssembler.extractSentToXray(factory, sentToXRayToSave);

    factory.save(domainSentToXRay);

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openmaxims-linux    文件:SendToXRayImpl.java   
public SentToXrayVo getSentToXRay(SentToXrayRefVo sentToXRay)
{
    if (sentToXRay == null || sentToXRay.getID_SentToXray() == null)
    {
        throw new CodingRuntimeException("Cannot get SentToXrayVo on null Id ");
    }

    DomainFactory factory = getDomainFactory();

    SentToXray domainSentToXRay = (SentToXray) factory.getDomainObject(SentToXray.class, sentToXRay.getID_SentToXray());

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openmaxims-linux    文件:SendToXRayImpl.java   
public SentToXrayVo save(SentToXrayVo sentToXRayToSave) throws ims.domain.exceptions.StaleObjectException
{
    if (sentToXRayToSave == null)
        throw new CodingRuntimeException("Cannot save null SentToXRay ");

    if (!sentToXRayToSave.isValidated())
        throw new DomainRuntimeException("SentToXrayVo Not Validated.");

    DomainFactory factory = getDomainFactory();
    SentToXray domainSentToXRay = SentToXrayVoAssembler.extractSentToXray(factory, sentToXRayToSave);

    factory.save(domainSentToXRay);

    return SentToXrayVoAssembler.create(domainSentToXRay);
}
项目:openMAXIMS    文件:AmentAttendanceSentToXrayTimesImpl.java   
public ims.emergency.vo.SentToXrayVo save(ims.emergency.vo.SentToXrayVo sentToXray) throws ims.domain.exceptions.StaleObjectException
{
    if(sentToXray == null)
        throw new CodingRuntimeException("Cannot save a null SentToXrayVo.");

    if(!sentToXray.isValidated())
        throw new CodingRuntimeException("SentToXrayVo is not validated.");

    DomainFactory factory = getDomainFactory();

    SentToXray doSeenBy = SentToXrayVoAssembler.extractSentToXray(factory, sentToXray);

    factory.save(doSeenBy);

    return SentToXrayVoAssembler.create(doSeenBy);
}