Files
BiCO/src/main/java/de/jottyfan/bico/modules/lesson/LessonService.java
2024-12-01 19:16:05 +01:00

43 lines
941 B
Java

package de.jottyfan.bico.modules.lesson;
import java.time.LocalDate;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import de.jottyfan.bico.db.public_.tables.records.TLessonRecord;
import de.jottyfan.bico.db.public_.tables.records.TPersonRecord;
/**
*
* @author jotty
*
*/
@Service
public class LessonService {
@Autowired
private LessonRepository repository;
public TLessonRecord getLesson(Integer slotId, Boolean createIfNecessary) {
return repository.getLesson(slotId, createIfNecessary);
}
public List<TPersonRecord> getPersons() {
return repository.getPersons();
}
public LocalDate getSlotDay(Integer slotId) {
return repository.getSlotDay(slotId);
}
public void updateLesson(TLessonRecord bean) {
repository.updateLesson(bean);
}
public void removeLesson(Integer lessonId) {
repository.removeLesson(lessonId);
}
}