ars.module.educate.service.AbstractScheduleService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ars-module-educate Show documentation
Show all versions of ars-module-educate Show documentation
Ars framework module educate
The newest version!
package ars.module.educate.service;
import ars.invoke.request.Requester;
import ars.invoke.request.ParameterInvalidException;
import ars.module.educate.model.Schedule;
import ars.module.educate.service.ScheduleService;
import ars.database.service.StandardGeneralService;
/**
* 课表业务操作抽象实现
*
* @author yongqiangwu
*
* @param
* 数据模型
*/
public abstract class AbstractScheduleService extends StandardGeneralService
implements ScheduleService {
@Override
public void initObject(Requester requester, T entity) {
super.initObject(requester, entity);
boolean exists = this.getRepository().query().eq("course", entity.getCourse())
.eq("classes", entity.getClasses()).eq("teacher", entity.getTeacher()).ne("id", entity.getId())
.count() > 0;
if (exists) {
throw new ParameterInvalidException("classes", "exist");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy