}
@SuppressWarnings("unchecked")
public boolean isPersonHasAppointmentsOrReplacementsOnThatDate(GDDate myGDDate, Person person) {
try {
List<RegistrationAppointment> appointmentList = (List<RegistrationAppointment>) system.query(new GetAllAppointmentMap(myGDDate));
for (RegistrationAppointment appointment : appointmentList) {
if(appointment.getRegistration().getStudent().getId().equals(person.getId())) {
if(appointment.isReplacement()) {
if(appointment.getAppointmentDate().getDayOfMonth() == myGDDate.getDayOfMonth()
&& appointment.getAppointmentDate().getMonth() == myGDDate.getMonth()