Class ClazzDaoHibernate
java.lang.Object
org.beangle.orm.hibernate.HibernateEntityDao
org.openurp.edu.clazz.dao.hibernate.internal.ClazzDaoHibernate
- All Implemented Interfaces:
org.beangle.commons.dao.EntityDao,ClazzDao
public class ClazzDaoHibernate
extends org.beangle.orm.hibernate.HibernateEntityDao
implements ClazzDao
-
Nested Class Summary
Nested classes/interfaces inherited from class org.beangle.orm.hibernate.HibernateEntityDao
org.beangle.orm.hibernate.HibernateEntityDao.QuerySupport -
Field Summary
Fields inherited from class org.beangle.orm.hibernate.HibernateEntityDao
logger, modelMeta, sessionFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcountClazz(Serializable id, ClazzFilterStrategy strategy, Semester semester) 按照学年度学期和给定的类别统计getClazzesByCategory(Serializable id, ClazzFilterStrategy strategy, Collection<Semester> semesters) 按照指定的类别获得当前学期的所有教学任务org.beangle.commons.collection.page.Page<Clazz> getClazzesByCategory(Serializable id, ClazzFilterStrategy strategy, Semester semester, int pageNo, int pageSize) 按照指定的类别获取当前学期的固定页面的教学任务getClazzesOfStd(Serializable stdId, List<Semester> semesters) getOccupancies(Clazz clazz) void删除教学任务voidsaveGenResult(ExecutivePlan plan, Semester semester, List<Clazz> clazzes, boolean removeExists) 1)保存一个培养计划的生成结果:tasks
2)更新培养计划,记录已经生成的学期标记voidsaveMergeResult(Clazz[] clazzes, int index) tasks[target] is to be updated,and other's is to be deleted.voidsaveOrUpdate(Clazz clazz) 保存新的教学任务或更新老的教学任务
如果教学任务是新的,那么就生成课程序号
如果教学任务是老的,那么就更新教学任务voidsetClazzCRNGenerator(ClazzCRNGenerator clazzSeqNoGenerator) intupdateClazzByCategory(String attr, Object value, Long id, ClazzFilterStrategy strategy, Semester semester) 依照过滤的类别,批量更新intupdateClazzByCriteria(String attr, Object value, Clazz clazz, Integer[] stdTypeIds, Long[] departIds) 通过更新条件查询的覆盖结果Methods inherited from class org.beangle.orm.hibernate.HibernateEntityDao
count, count, count, createBlob, createBlob, createClob, duplicate, duplicate, evict, execute, execute, executeUpdate, executeUpdate, executeUpdateRepeatly, exist, exist, exist, get, get, get, get, get, get, get, get, get, getAll, getSession, initialize, refresh, remove, remove, remove, remove, remove, save, saveOrUpdate, saveOrUpdate, saveOrUpdate, saveOrUpdate, search, search, search, search, search, setModelMeta, setSessionFactory, uniqueResult, update, update
-
Constructor Details
-
ClazzDaoHibernate
public ClazzDaoHibernate()
-
-
Method Details
-
getClazzesByCategory
public org.beangle.commons.collection.page.Page<Clazz> getClazzesByCategory(Serializable id, ClazzFilterStrategy strategy, Semester semester, int pageNo, int pageSize) Description copied from interface:ClazzDao按照指定的类别获取当前学期的固定页面的教学任务- Specified by:
getClazzesByCategoryin interfaceClazzDao- Parameters:
id-pageNo-pageSize-- Returns:
-
getClazzesByCategory
public List<Clazz> getClazzesByCategory(Serializable id, ClazzFilterStrategy strategy, Collection<Semester> semesters) Description copied from interface:ClazzDao按照指定的类别获得当前学期的所有教学任务- Specified by:
getClazzesByCategoryin interfaceClazzDao- Parameters:
id-strategy-- Returns:
-
getClazzesOfStd
-
updateClazzByCategory
public int updateClazzByCategory(String attr, Object value, Long id, ClazzFilterStrategy strategy, Semester semester) Description copied from interface:ClazzDao依照过滤的类别,批量更新- Specified by:
updateClazzByCategoryin interfaceClazzDao- Parameters:
attr-value-semester-
-
updateClazzByCriteria
public int updateClazzByCriteria(String attr, Object value, Clazz clazz, Integer[] stdTypeIds, Long[] departIds) Description copied from interface:ClazzDao通过更新条件查询的覆盖结果- Specified by:
updateClazzByCriteriain interfaceClazzDao- Parameters:
attr-value-clazz-stdTypeIds-departIds-
-
countClazz
Description copied from interface:ClazzDao按照学年度学期和给定的类别统计- Specified by:
countClazzin interfaceClazzDao- Parameters:
strategy-- Returns:
-
saveMergeResult
Description copied from interface:ClazzDaotasks[target] is to be updated,and other's is to be deleted.- Specified by:
saveMergeResultin interfaceClazzDao- Parameters:
clazzes-index-
-
remove
Description copied from interface:ClazzDao删除教学任务 -
getOccupancies
-
saveGenResult
public void saveGenResult(ExecutivePlan plan, Semester semester, List<Clazz> clazzes, boolean removeExists) Description copied from interface:ClazzDao1)保存一个培养计划的生成结果:tasks
2)更新培养计划,记录已经生成的学期标记- Specified by:
saveGenResultin interfaceClazzDao- Parameters:
plan- 来自于哪个培养计划semester- 生成到哪个学期?clazzes- 没有保存的任务removeExists- 是否删除已经生成过的教学任务
-
saveOrUpdate
Description copied from interface:ClazzDao保存新的教学任务或更新老的教学任务
如果教学任务是新的,那么就生成课程序号
如果教学任务是老的,那么就更新教学任务- Specified by:
saveOrUpdatein interfaceClazzDao- Parameters:
clazz-
-
setClazzCRNGenerator
-