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

项目:AvoinApotti    文件:PendingArrivalsImpl.java   
public EmergencyAttendanceForPendingArrivalsVo save(TrackingForQuickRegistrationVo trackingToSave, EmergencyAttendanceForPendingArrivalsVo emergencyAttendanceToSave) throws StaleObjectException
{
    if (trackingToSave == null && emergencyAttendanceToSave == null)
        throw new CodingRuntimeException("Cannot save null AllocatedMedic or TrackingForAllocatedMedicVo ");

    if (!trackingToSave.isValidated())
        throw new DomainRuntimeException("TrackingForQuickRegistrationVo Not Validated.");

    if (!emergencyAttendanceToSave.isValidated())
        throw new DomainRuntimeException("EmergencyAttendanceForPendingArrivalsVo Not Validated.");

    DomainFactory factory = getDomainFactory();

    Tracking domainTracking = TrackingForQuickRegistrationVoAssembler.extractTracking(factory, trackingToSave);
    factory.save(domainTracking);

    EmergencyAttendance domainEmergencyAtt = EmergencyAttendanceForPendingArrivalsVoAssembler.extractEmergencyAttendance(factory, emergencyAttendanceToSave);
    factory.save(domainEmergencyAtt);

    return EmergencyAttendanceForPendingArrivalsVoAssembler.create(domainEmergencyAtt);

}
项目:openMAXIMS    文件:PendingArrivalsImpl.java   
public EmergencyAttendanceForPendingArrivalsVo save(TrackingForQuickRegistrationVo trackingToSave, EmergencyAttendanceForPendingArrivalsVo emergencyAttendanceToSave) throws StaleObjectException
{
    if (trackingToSave == null && emergencyAttendanceToSave == null)
        throw new CodingRuntimeException("Cannot save null AllocatedMedic or TrackingForAllocatedMedicVo ");

    if (!trackingToSave.isValidated())
        throw new DomainRuntimeException("TrackingForQuickRegistrationVo Not Validated.");

    if (!emergencyAttendanceToSave.isValidated())
        throw new DomainRuntimeException("EmergencyAttendanceForPendingArrivalsVo Not Validated.");

    DomainFactory factory = getDomainFactory();

    Tracking domainTracking = TrackingForQuickRegistrationVoAssembler.extractTracking(factory, trackingToSave);
    factory.save(domainTracking);

    EmergencyAttendance domainEmergencyAtt = EmergencyAttendanceForPendingArrivalsVoAssembler.extractEmergencyAttendance(factory, emergencyAttendanceToSave);
    factory.save(domainEmergencyAtt);

    return EmergencyAttendanceForPendingArrivalsVoAssembler.create(domainEmergencyAtt);

}
项目:openMAXIMS    文件:PendingArrivalsImpl.java   
public EmergencyAttendanceForPendingArrivalsVo save(TrackingForQuickRegistrationVo trackingToSave, EmergencyAttendanceForPendingArrivalsVo emergencyAttendanceToSave) throws StaleObjectException
{
    if (trackingToSave == null && emergencyAttendanceToSave == null)
        throw new CodingRuntimeException("Cannot save null AllocatedMedic or TrackingForAllocatedMedicVo ");

    if (!trackingToSave.isValidated())
        throw new DomainRuntimeException("TrackingForQuickRegistrationVo Not Validated.");

    if (!emergencyAttendanceToSave.isValidated())
        throw new DomainRuntimeException("EmergencyAttendanceForPendingArrivalsVo Not Validated.");

    DomainFactory factory = getDomainFactory();

    Tracking domainTracking = TrackingForQuickRegistrationVoAssembler.extractTracking(factory, trackingToSave);
    factory.save(domainTracking);

    EmergencyAttendance domainEmergencyAtt = EmergencyAttendanceForPendingArrivalsVoAssembler.extractEmergencyAttendance(factory, emergencyAttendanceToSave);
    factory.save(domainEmergencyAtt);

    return EmergencyAttendanceForPendingArrivalsVoAssembler.create(domainEmergencyAtt);

}
项目:openmaxims-linux    文件:PendingArrivalsImpl.java   
public EmergencyAttendanceForPendingArrivalsVo save(TrackingForQuickRegistrationVo trackingToSave, EmergencyAttendanceForPendingArrivalsVo emergencyAttendanceToSave) throws StaleObjectException
{
    if (trackingToSave == null && emergencyAttendanceToSave == null)
        throw new CodingRuntimeException("Cannot save null AllocatedMedic or TrackingForAllocatedMedicVo ");

    if (!trackingToSave.isValidated())
        throw new DomainRuntimeException("TrackingForQuickRegistrationVo Not Validated.");

    if (!emergencyAttendanceToSave.isValidated())
        throw new DomainRuntimeException("EmergencyAttendanceForPendingArrivalsVo Not Validated.");

    DomainFactory factory = getDomainFactory();

    Tracking domainTracking = TrackingForQuickRegistrationVoAssembler.extractTracking(factory, trackingToSave);
    factory.save(domainTracking);

    EmergencyAttendance domainEmergencyAtt = EmergencyAttendanceForPendingArrivalsVoAssembler.extractEmergencyAttendance(factory, emergencyAttendanceToSave);
    factory.save(domainEmergencyAtt);

    return EmergencyAttendanceForPendingArrivalsVoAssembler.create(domainEmergencyAtt);

}