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