Java 类ims.emergency.vo.TrackingForSendToXRayVo 实例源码

项目: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);
}
项目: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 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 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 TrackingForSendToXRayVo getTracking(TrackingRefVo trackingRef)
{
    if (trackingRef == null || trackingRef.getID_Tracking() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID ");

    List<?> list = factory.find(hql.toString(), new String[] {"trackingID"}, new Object[] {trackingRef.getID_Tracking()});
    return TrackingForSendToXRayVoAssembler.createTrackingForSendToXRayVoCollectionFromTracking(list).get(0);   
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public TrackingForSendToXRayVo getTracking(TrackingRefVo trackingRef)
{
    if (trackingRef == null || trackingRef.getID_Tracking() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID ");

    List<?> list = factory.find(hql.toString(), new String[] {"trackingID"}, new Object[] {trackingRef.getID_Tracking()});
    return TrackingForSendToXRayVoAssembler.createTrackingForSendToXRayVoCollectionFromTracking(list).get(0);   
}
项目:openMAXIMS    文件:SendToXRayImpl.java   
public TrackingForSendToXRayVo getTracking(TrackingRefVo trackingRef)
{
    if (trackingRef == null || trackingRef.getID_Tracking() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID ");

    List<?> list = factory.find(hql.toString(), new String[] {"trackingID"}, new Object[] {trackingRef.getID_Tracking()});
    return TrackingForSendToXRayVoAssembler.createTrackingForSendToXRayVoCollectionFromTracking(list).get(0);   
}
项目:openmaxims-linux    文件:SendToXRayImpl.java   
public TrackingForSendToXRayVo getTracking(TrackingRefVo trackingRef)
{
    if (trackingRef == null || trackingRef.getID_Tracking() == null)
    {
        throw new CodingRuntimeException("Cannot get TrackingAreaRefVo on null Id for Tracking ");
    }

    DomainFactory factory = getDomainFactory();

    StringBuffer hql = new StringBuffer();
    hql.append("select tracking from Tracking as tracking where tracking.id = :trackingID ");

    List<?> list = factory.find(hql.toString(), new String[] {"trackingID"}, new Object[] {trackingRef.getID_Tracking()});
    return TrackingForSendToXRayVoAssembler.createTrackingForSendToXRayVoCollectionFromTracking(list).get(0);   
}