package com.agilex.healthcare.schedulingmanager.datalayer.appointment;

import com.agilex.healthcare.schedulingmanager.domain.SMAppointmentRequestInProcess;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AppointmentRequestInProcessDataLayerRepo implements AppointmentRequestInProcessDataLayer {

	@Resource
	AppointmentRequestInProcessDao appointmentRequestInProcessDao;

	@Override
	public SMAppointmentRequestInProcess fetchAppointmentRequestInProcessByAppointmentRequestId(String appointmentRequestId) {
		return appointmentRequestInProcessDao.get(appointmentRequestId);
	}

	@Override
    public SMAppointmentRequestInProcess saveAppointmentRequestInProcess(SMAppointmentRequestInProcess SMAppointmentRequestInProcess) {
		return appointmentRequestInProcessDao.save(SMAppointmentRequestInProcess);
	}

	@Override
	public void deleteAppointmentRequestInProcessByUserId(String userId) {
		appointmentRequestInProcessDao.deleteByUserId(userId);
	}

	@Override
	public void deleteAppointmentRequestInProcessById(String appointmentRequestId) {
		appointmentRequestInProcessDao.deleteById(appointmentRequestId);
	}

}
