Package org.openurp.edu.course.model
Class Session
- java.lang.Object
-
- org.beangle.commons.entity.pojo.NumberIdObject<Long>
-
- org.beangle.commons.entity.pojo.LongIdObject
-
- org.openurp.edu.course.model.Session
-
- All Implemented Interfaces:
Serializable,Comparable<Session>,org.beangle.commons.entity.Entity<Long>
@Entity(name="org.openurp.edu.course.model.Session") public class Session extends org.beangle.commons.entity.pojo.LongIdObject implements Comparable<Session>
教学活动- Since:
- 2005-11-22
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanMergerWith(Session session)判断该教学活动的时间段能否与目标教学活动在[相邻时间段]上合并Objectclone()intcompareTo(Session session)teacher room weekday startUnit weekstate null will be put first,if another is not nullbooleancontains(Date oneDay)DategetBeginAt()ClazzgetClazz()StringgetContent()DategetEndAt()DategetFirstActivityTime()第一次活动时间DategetLastActivityTime()最后一次活动时间StringgetRemark()Set<Classroom>getRooms()Set<Teacher>getTeachers()WeekTimegetTime()static List<Session>mergeActivites(List<Session> tobeMerged)合并在年份和教学周占用上,可以合并的教学活动
合并标准是年份,教学周,教室,教师,星期voidmergeWith(Session other)将两排课活动合并,前提是两活动可以合并voidsetClazz(Clazz clazz)voidsetRemark(String remark)voidsetRooms(Set<Classroom> rooms)voidsetTeachers(Set<Teacher> teachers)voidsetTime(WeekTime time)StringtoString()
-
-
-
Method Detail
-
getFirstActivityTime
public Date getFirstActivityTime()
第一次活动时间- Parameters:
calendar-- Returns:
-
getLastActivityTime
public Date getLastActivityTime()
最后一次活动时间- Parameters:
calendar-- Returns:
-
canMergerWith
public boolean canMergerWith(Session session)
判断该教学活动的时间段能否与目标教学活动在[相邻时间段]上合并- Parameters:
other-- Returns:
-
mergeWith
public void mergeWith(Session other)
将两排课活动合并,前提是两活动可以合并- Parameters:
other-- See Also:
canMergerWith(Session)
-
mergeActivites
public static List<Session> mergeActivites(List<Session> tobeMerged)
合并在年份和教学周占用上,可以合并的教学活动
合并标准是年份,教学周,教室,教师,星期
-
compareTo
public int compareTo(Session session)
teacher room weekday startUnit weekstate null will be put first,if another is not null- Specified by:
compareToin interfaceComparable<Session>- See Also:
Comparable.compareTo(Object)
-
toString
public String toString()
- Overrides:
toStringin classObject- See Also:
Object.toString()
-
getClazz
public Clazz getClazz()
- Returns:
- Returns the clazz.
-
setClazz
public void setClazz(Clazz clazz)
-
getTime
public WeekTime getTime()
-
setTime
public void setTime(WeekTime time)
-
getBeginAt
public Date getBeginAt()
-
getEndAt
public Date getEndAt()
-
contains
public boolean contains(Date oneDay)
-
getContent
public String getContent()
-
getRemark
public String getRemark()
-
setRemark
public void setRemark(String remark)
-
-