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

项目: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);
}