org.sakaiproject.component.section
Class CourseSectionImpl

java.lang.Object
  extended by org.sakaiproject.component.section.AbstractPersistentObject
      extended by org.sakaiproject.component.section.LearningContextImpl
          extended by org.sakaiproject.component.section.CourseSectionImpl
All Implemented Interfaces:
Serializable, Comparable, CourseSection, LearningContext

public class CourseSectionImpl
extends LearningContextImpl
implements CourseSection, Comparable, Serializable

A detachable CourseSection for persistent storage.

Author:
Josh Holtzman
See Also:
Serialized Form

Field Summary
protected  String category
           
protected  Course course
           
protected  Integer maxEnrollments
           
protected  List meetings
           
 
Fields inherited from class org.sakaiproject.component.section.AbstractPersistentObject
id, title, uuid, version
 
Constructor Summary
CourseSectionImpl()
          Default constructor needed by hibernate
CourseSectionImpl(CourseSection section)
          Converts an arbitrary CourseSection into an instance of this class
CourseSectionImpl(Course course, String title, String uuid, String category, Integer maxEnrollments, List meetings)
           
CourseSectionImpl(Course course, String title, String uuid, String category, Integer maxEnrollments, String location, Time startTime, Time endTime, boolean monday, boolean tuesday, boolean wednesday, boolean thursday, boolean friday, boolean saturday, boolean sunday)
          Convenience constructor to create a CourseSection with a single meeting.
 
Method Summary
 int compareTo(Object o)
          Compares CourseSectionImpls based on their category ID and title.
 String getCategory()
          Gets the category ID of this CourseSection.
 Course getCourse()
          Gets the Course that this CourseSection belongs to
 String getEid()
          Standalone does not support the notion of enterprise-defined CourseSections.
 Integer getMaxEnrollments()
          Gets the maximum number of enrollments allowed in this CourseSection.
 List getMeetings()
          Gets the meetings for this CourseSection.
 void setCategory(String category)
           
 void setCourse(Course course)
           
 void setMaxEnrollments(Integer maxEnrollments)
           
 void setMeetings(List meetings)
           
 
Methods inherited from class org.sakaiproject.component.section.LearningContextImpl
equals, hashCode
 
Methods inherited from class org.sakaiproject.component.section.AbstractPersistentObject
getId, getTitle, getUuid, getVersion, setId, setTitle, setUuid, setVersion, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.section.api.coursemanagement.LearningContext
getTitle, getUuid, setTitle
 

Field Detail

course

protected Course course

category

protected String category

maxEnrollments

protected Integer maxEnrollments

meetings

protected List meetings
Constructor Detail

CourseSectionImpl

public CourseSectionImpl()
Default constructor needed by hibernate


CourseSectionImpl

public CourseSectionImpl(CourseSection section)
Converts an arbitrary CourseSection into an instance of this class


CourseSectionImpl

public CourseSectionImpl(Course course,
                         String title,
                         String uuid,
                         String category,
                         Integer maxEnrollments,
                         String location,
                         Time startTime,
                         Time endTime,
                         boolean monday,
                         boolean tuesday,
                         boolean wednesday,
                         boolean thursday,
                         boolean friday,
                         boolean saturday,
                         boolean sunday)
Convenience constructor to create a CourseSection with a single meeting.

Parameters:
course -
title -
uuid -
category -
maxEnrollments -
location -
startTime -
endTime -
monday -
tuesday -
wednesday -
thursday -
friday -
saturday -
sunday -

CourseSectionImpl

public CourseSectionImpl(Course course,
                         String title,
                         String uuid,
                         String category,
                         Integer maxEnrollments,
                         List meetings)
Method Detail

getCategory

public String getCategory()
Description copied from interface: CourseSection
Gets the category ID of this CourseSection. Students may be enrolled in only one section of a given category per Course.

Specified by:
getCategory in interface CourseSection
Returns:

setCategory

public void setCategory(String category)

getCourse

public Course getCourse()
Description copied from interface: CourseSection
Gets the Course that this CourseSection belongs to

Specified by:
getCourse in interface CourseSection
Returns:

setCourse

public void setCourse(Course course)

getMaxEnrollments

public Integer getMaxEnrollments()
Description copied from interface: CourseSection
Gets the maximum number of enrollments allowed in this CourseSection. Instructors and TAs may assign more than the maximum number of enrollments, but students may not self enroll in a section at or above the maximum number of enrollments.

Specified by:
getMaxEnrollments in interface CourseSection
Returns:

setMaxEnrollments

public void setMaxEnrollments(Integer maxEnrollments)

getMeetings

public List getMeetings()
Description copied from interface: CourseSection
Gets the meetings for this CourseSection.

Specified by:
getMeetings in interface CourseSection
Returns:

setMeetings

public void setMeetings(List meetings)

compareTo

public int compareTo(Object o)
Compares CourseSectionImpls based on their category ID and title. Sections without a category are sorted last.

Specified by:
compareTo in interface Comparable

getEid

public String getEid()
Standalone does not support the notion of enterprise-defined CourseSections.

Specified by:
getEid in interface CourseSection
Returns:
The enterprise ID of the Section that this CourseSection models.


Copyright © 2011 Sakai Project. All Rights Reserved.