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

项目:AvoinApotti    文件:SendToAreaImpl.java   
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) 
{
    if( trackingRef == null)
        throw new CodingRuntimeException("Tracking cannot be null");

    DomainFactory factory = getDomainFactory();

    String hsql = "from Tracking as t1_1 where  (t1_1.id = :idTracking) ";

    List trackings = factory.find(hsql, new String[] {"idTracking"}, new Object[] { trackingRef.getID_Tracking()});

    if( trackings != null && trackings.size() > 0)
    {
        TrackingLiteVoCollection tempColl = TrackingLiteVoAssembler.createTrackingLiteVoCollectionFromTracking(trackings);
        if( tempColl != null && tempColl.size() > 0)
        {
            return tempColl.get(0);
        }
    }

    return null;
}
项目:openMAXIMS    文件:SendToAreaImpl.java   
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) 
{
    if( trackingRef == null)
        throw new CodingRuntimeException("Tracking cannot be null");

    DomainFactory factory = getDomainFactory();

    String hsql = "from Tracking as t1_1 where  (t1_1.id = :idTracking) ";

    List trackings = factory.find(hsql, new String[] {"idTracking"}, new Object[] { trackingRef.getID_Tracking()});

    if( trackings != null && trackings.size() > 0)
    {
        TrackingLiteVoCollection tempColl = TrackingLiteVoAssembler.createTrackingLiteVoCollectionFromTracking(trackings);
        if( tempColl != null && tempColl.size() > 0)
        {
            return tempColl.get(0);
        }
    }

    return null;
}
项目:openMAXIMS    文件:SendToAreaImpl.java   
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) 
{
    if( trackingRef == null)
        throw new CodingRuntimeException("Tracking cannot be null");

    DomainFactory factory = getDomainFactory();

    String hsql = "from Tracking as t1_1 where  (t1_1.id = :idTracking) ";

    List trackings = factory.find(hsql, new String[] {"idTracking"}, new Object[] { trackingRef.getID_Tracking()});

    if( trackings != null && trackings.size() > 0)
    {
        TrackingLiteVoCollection tempColl = TrackingLiteVoAssembler.createTrackingLiteVoCollectionFromTracking(trackings);
        if( tempColl != null && tempColl.size() > 0)
        {
            return tempColl.get(0);
        }
    }

    return null;
}
项目:openmaxims-linux    文件:SendToAreaImpl.java   
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) 
{
    if( trackingRef == null)
        throw new CodingRuntimeException("Tracking cannot be null");

    DomainFactory factory = getDomainFactory();

    String hsql = "from Tracking as t1_1 where  (t1_1.id = :idTracking) ";

    List trackings = factory.find(hsql, new String[] {"idTracking"}, new Object[] { trackingRef.getID_Tracking()});

    if( trackings != null && trackings.size() > 0)
    {
        TrackingLiteVoCollection tempColl = TrackingLiteVoAssembler.createTrackingLiteVoCollectionFromTracking(trackings);
        if( tempColl != null && tempColl.size() > 0)
        {
            return tempColl.get(0);
        }
    }

    return null;
}
项目:AvoinApotti    文件:AllocateCubicleImpl.java   
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) 
{
    if( trackingRef == null)
        throw new CodingRuntimeException("Tracking not provided");

    DomainFactory factory = getDomainFactory();
    ims.emergency.domain.objects.Tracking doTracking = (ims.emergency.domain.objects.Tracking) factory.getDomainObject(ims.emergency.domain.objects.Tracking.class, trackingRef.getID_Tracking());
    return TrackingLiteVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:AllocateCubicleImpl.java   
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) 
{
    if( trackingRef == null)
        throw new CodingRuntimeException("Tracking not provided");

    DomainFactory factory = getDomainFactory();
    ims.emergency.domain.objects.Tracking doTracking = (ims.emergency.domain.objects.Tracking) factory.getDomainObject(ims.emergency.domain.objects.Tracking.class, trackingRef.getID_Tracking());
    return TrackingLiteVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:AllocateCubicleImpl.java   
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) 
{
    if( trackingRef == null)
        throw new CodingRuntimeException("Tracking not provided");

    DomainFactory factory = getDomainFactory();
    ims.emergency.domain.objects.Tracking doTracking = (ims.emergency.domain.objects.Tracking) factory.getDomainObject(ims.emergency.domain.objects.Tracking.class, trackingRef.getID_Tracking());
    return TrackingLiteVoAssembler.create(doTracking);
}
项目:openmaxims-linux    文件:AllocateCubicleImpl.java   
public TrackingLiteVo getTrackingLiteVo(TrackingRefVo trackingRef) 
{
    if( trackingRef == null)
        throw new CodingRuntimeException("Tracking not provided");

    DomainFactory factory = getDomainFactory();
    ims.emergency.domain.objects.Tracking doTracking = (ims.emergency.domain.objects.Tracking) factory.getDomainObject(ims.emergency.domain.objects.Tracking.class, trackingRef.getID_Tracking());
    return TrackingLiteVoAssembler.create(doTracking);
}
项目:AvoinApotti    文件:SendToAreaImpl.java   
public TrackingLiteVo saveTrackingAndTrackingMovementTimes( TrackingLiteVo record, TrackingMovementTimesVo trackingMovementTimes) throws StaleObjectException // WDEV-18278
{
    if( record == null || trackingMovementTimes == null)
        throw new DomainRuntimeException(" Tracking or TrackingMovementTimes are not validated.");

    DomainFactory factory = getDomainFactory();

    Tracking doTracking = TrackingLiteVoAssembler.extractTracking(factory, record);

    factory.save(doTracking);

    TrackingMovementTimes doTrackingMovementTimes = TrackingMovementTimesVoAssembler.extractTrackingMovementTimes(factory, trackingMovementTimes);
    factory.save(doTrackingMovementTimes);

    return TrackingLiteVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:SendToAreaImpl.java   
public TrackingLiteVo saveTrackingAndTrackingMovementTimes( TrackingLiteVo record, TrackingMovementTimesVo trackingMovementTimes, CurrentPartialAdmissionForSendToAreaVo partialAdmission, Boolean trigersPreAdmissiontoPAS, EpisodeofCareVo epOfCare, CareContextVo careContext) throws StaleObjectException // WDEV-18278
{
    if( record == null || trackingMovementTimes == null)
        throw new DomainRuntimeException(" Tracking or TrackingMovementTimes are not validated.");

    DomainFactory factory = getDomainFactory();

    Tracking doTracking = TrackingLiteVoAssembler.extractTracking(factory, record);

    factory.save(doTracking);

    TrackingMovementTimes doTrackingMovementTimes = TrackingMovementTimesVoAssembler.extractTrackingMovementTimes(factory, trackingMovementTimes);
    factory.save(doTrackingMovementTimes);

    if (Boolean.TRUE.equals(trigersPreAdmissiontoPAS))
    {
        if (partialAdmission != null)
        {
            EDPartialAdmission doPartialAdmission = CurrentPartialAdmissionForSendToAreaVoAssembler.extractEDPartialAdmission(factory, partialAdmission);
            factory.save(doPartialAdmission);
        }

        if (record != null)
        {
            EDPartialAdmissionDialog dom = (EDPartialAdmissionDialog) getDomainImpl(EDPartialAdmissionDialogImpl.class);
            try
            {
                dom.triggerCancelPartialAdmission(record.getAttendance(), record.getCurrentPartialAdmission());
            }
            catch (DomainInterfaceException e)
            {
                e.printStackTrace();
            }
        }
    }

    if (careContext != null && epOfCare != null)
    {
        CareContext doCare = CareContextVoAssembler.extractCareContext(factory,careContext);
        factory.save(doCare);

        EpisodeofCareVo lastEpofcare = getEpisodeOfCare(epOfCare.getID_EpisodeOfCare());
        EpisodeOfCare doEpisode = EpisodeofCareVoAssembler.extractEpisodeOfCare(factory, lastEpofcare);
        doEpisode.getCareContexts().add(doCare);
        factory.save(doEpisode);        
    }

    return TrackingLiteVoAssembler.create(doTracking);
}
项目:openMAXIMS    文件:SendToAreaImpl.java   
public TrackingLiteVo saveTrackingAndTrackingMovementTimes( TrackingLiteVo record, TrackingMovementTimesVo trackingMovementTimes) throws StaleObjectException // WDEV-18278
{
    if( record == null || trackingMovementTimes == null)
        throw new DomainRuntimeException(" Tracking or TrackingMovementTimes are not validated.");

    DomainFactory factory = getDomainFactory();

    Tracking doTracking = TrackingLiteVoAssembler.extractTracking(factory, record);

    factory.save(doTracking);

    TrackingMovementTimes doTrackingMovementTimes = TrackingMovementTimesVoAssembler.extractTrackingMovementTimes(factory, trackingMovementTimes);
    factory.save(doTrackingMovementTimes);

    return TrackingLiteVoAssembler.create(doTracking);
}
项目:openmaxims-linux    文件:SendToAreaImpl.java   
public TrackingLiteVo saveTrackingAndTrackingMovementTimes( TrackingLiteVo record, TrackingMovementTimesVo trackingMovementTimes) throws StaleObjectException // WDEV-18278
{
    if( record == null || trackingMovementTimes == null)
        throw new DomainRuntimeException(" Tracking or TrackingMovementTimes are not validated.");

    DomainFactory factory = getDomainFactory();

    Tracking doTracking = TrackingLiteVoAssembler.extractTracking(factory, record);

    factory.save(doTracking);

    TrackingMovementTimes doTrackingMovementTimes = TrackingMovementTimesVoAssembler.extractTrackingMovementTimes(factory, trackingMovementTimes);
    factory.save(doTrackingMovementTimes);

    return TrackingLiteVoAssembler.create(doTracking);
}