@Override public void deleteByOrderNum( @NotNull @Valid Long courseId, @NotNull @Valid Long lessonOrderNum, @NotNull @Valid Long orderNum) { lessonLinkDAO.deleteByOrderNum(lessonDAO.getByOrderNum(courseId, lessonOrderNum), orderNum); }
@Nullable @Override public LessonLinkVO getByOrderNum( @NotNull Long courseId, @NotNull Long lessonOrderNum, @NotNull Long orderNum) { return convertEntityToVO( lessonLinkDAO.getByOrderNum(lessonDAO.getByOrderNum(courseId, lessonOrderNum), orderNum)); }
@Nullable @Override public LessonLinkVO updateByOrderNum( @NotNull Long courseId, @NotNull Long lessonOrderNum, @NotNull Long orderNum, LessonLinkVO lessonLink) { return convertEntityToVO( lessonLinkDAO.updateByOrderNum( lessonDAO.getByOrderNum(courseId, lessonOrderNum), orderNum, convertVOToEntity(lessonLink))); }
@Nullable @Override public Set<LessonLinkVO> getByLessonId(@NotNull Long courseId, @NotNull Long lessonOrderNum) { return convertEntitiesToVOs( lessonLinkDAO.getAllLessonLinksByLesson(lessonDAO.getByOrderNum(courseId, lessonOrderNum))); }
@Nullable @Override public LessonLinkVO getById(@NotNull Long id) { return convertEntityToVO(lessonLinkDAO.getById(id)); }
@Override public void remove(@NotNull LessonLinkVO lessonLinkVO) { lessonLinkDAO.remove(convertVOToEntity(lessonLinkVO)); }
@Override public LessonLinkVO update(@NotNull @Valid LessonLinkVO lessonLinkVO) { return convertEntityToVO(lessonLinkDAO.update(convertVOToEntity(lessonLinkVO))); }
@Override public void save(@NotNull @Valid LessonLinkVO lessonLinkVO) { LessonLinkEntity lessonLinkEntity = convertVOToEntity(lessonLinkVO); lessonLinkDAO.save(lessonLinkEntity); lessonLinkVO.setId(lessonLinkEntity.getId()); }