org.sakaiproject.component.common.edu.coursemanagement
Class CourseSectionImpl

java.lang.Object
  extended byorg.sakaiproject.component.common.edu.coursemanagement.CourseSectionImpl
All Implemented Interfaces:
CourseSection, Persistable, Serializable

public class CourseSectionImpl
extends Object
implements CourseSection, Serializable

See Also:
Serialized Form

Constructor Summary
CourseSectionImpl()
           
CourseSectionImpl(String title, String description, String sectionNumber, String courseOfferingUuid, SessionImpl session, CourseSectionType type)
           
 
Method Summary
 void addEnrollmentRecord(EnrollmentRecord enrollmentRecord)
          Add an enrollment record for a student enrolled in this section.
 void addLeader(ParticipationRecord participationRecord)
          Add a participation record as an instructor of this section.
 void addOtherPerson(ParticipationRecord participant)
          Add a person to the other set.
 void addSectionEvent(String sectionEvent)
          Add an event given it's uuid.
 boolean equals(Object rhs)
          Implementation of the equals comparison on the basis of equality of the primary key values.
 Boolean getAllowSelfRegistration()
          Check to see if self-registration is allowed for this section.
 Set getAllSubSections()
          Get a set of uuids of child sections derived from this course section.
 String getCourseOffering()
          Get the course offering uuid that this course section represents.
 Long getCourseSectionId()
          Return the simple primary key value that identifies this object.
 String getCreatedBy()
          The Agent that created this persistent object.
 Date getCreatedDate()
          The time and date this persistent object was created.
 String getDescription()
          Get the description of this course section.
 Set getEnrollmentRecords()
          Get the set of enrollment records for students enrolled in this section.
 EnrollmentStatusType getEnrollmentStatus()
          Get the enrollment status type.
 Boolean getHoldingSection()
          Check to see if this is a holding section.
 String getLastModifiedBy()
          The last Agent that modified the persistent state of this object.
 Date getLastModifiedDate()
          The last time this object's persistent state was modified.
 Set getLeaders()
          Get the set of participation for the instructors of this course.
 String getLocation()
          Get the location of a course section.
 Integer getMaximumStudents()
          Get the maxiumum number of students permitted to enroll in this course section.
 String getMeetingTime()
          Get the meeting time of a course section.
 Set getOtherPeople()
          Get a set of other people associated with this course offering.
 String getParentId()
          Get the parent uuid of a course section.
 CourseSection getParentSection()
           
 Set getParticipationSet()
           
 String getSchedule()
          Get the schedule of a course section.
 String getScheduleEvent()
          Get the schedule of a course section.
 Set getSectionEvents()
          Get the set of event associated with this course section.
 String getSectionEventsString()
          Set the value of the SECTIONEVENTS column.
 String getSectionNumber()
          Get the course section number.
 CourseSectionStatusType getSectionStatus()
          Get the course section status type.
 CourseSectionType getSectionType()
          Get the course section type.
 Session getSession()
          Get the session for this course section.
 Set getSubSectionsByType(CourseSectionType type)
          Get a set of uuids of child sections of a given type, derived from this course section.
 Set getSubSectionSet()
           
 String getTitle()
          Get the title of a course section.
 String getUuid()
          All persistent objects must have a UUID.
 int hashCode()
          Implementation of the hashCode method conforming to the Bloch pattern with the exception of array properties (these are very unlikely primary key types).
 void removeEnrollmentRecord(EnrollmentRecord enrollmentRecord)
          Remove the enrollment record of a student for this ection.
 void removeEnrollmentRecord(String agentUuid)
           
 void removeLeader(String agentUuid)
          Remove a leader given an agent uuid.
 void removeOtherPerson(String agentUuid)
          Remove a person from the other set given an agent uuid.
 void removeSectionEvent(String sectionEvent)
          Remove an event given it's uuid.
 void setAllowSelfRegistration(Boolean allowSelfRegistration)
          Set the self registration flag.
 void setCourseOffering(String courseOfferingUuid)
          Set the course offering uuid id that this course section represents.
 void setCourseSectionId(Long courseSectionId)
          Set the simple primary key value that identifies this object.
 void setCreatedBy(String createdBy)
           
 void setCreatedDate(Date createdDate)
           
 void setDescription(String description)
          Set the descriptionof this course section.
 void setEnrollmentRecords(Set enrollmentSet)
           
 void setEnrollmentStatus(EnrollmentStatusType status)
          Set the enrollment status type.
 void setHoldingSection(Boolean holdingSection)
          Set the holding section flag.
 void setLastModifiedBy(String lastModifiedBy)
           
 void setLastModifiedDate(Date lastModifiedDate)
           
 void setLocation(String location)
          Set the location of this course section.
 void setMaximumStudents(Integer maxStudents)
          Set the maximum number of students permitted to entroll in this course section.
 void setMeetingTime(String meetingTime)
          Set the meeting time of this course section.
 void setParentId(String parentUuid)
          Set the parentId of this course section.
 void setParentSection(CourseSection parentSection)
           
 void setParticipationSet(Set participationSet)
           
 void setSchedule(String schedule)
          Set the schedule of this course section.
 void setScheduleEvent(String scheduleEvent)
          Set the schedule of this course section.
 void setSectionEventsString(String sectionEventsString)
           
 void setSectionNumber(String sectionNumber)
          Set the course section number.
 void setSectionStatus(CourseSectionStatusType status)
          Set the course section status type.
 void setSectionType(CourseSectionType type)
          Set the course section type.
 void setSession(Session session)
          Set the session for this course section.
 void setSubSectionSet(Set subSectionSet)
           
 void setTitle(String title)
          Set the title of this course section.
 void setUuid(String uuid)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CourseSectionImpl

public CourseSectionImpl()

CourseSectionImpl

public CourseSectionImpl(String title,
                         String description,
                         String sectionNumber,
                         String courseOfferingUuid,
                         SessionImpl session,
                         CourseSectionType type)
Method Detail

getCourseSectionId

public Long getCourseSectionId()
Return the simple primary key value that identifies this object.

Returns:
java.lang.Long

setCourseSectionId

public void setCourseSectionId(Long courseSectionId)
Set the simple primary key value that identifies this object.

Parameters:
courseSectionId -

getTitle

public String getTitle()
Description copied from interface: CourseSection
Get the title of a course section.

Specified by:
getTitle in interface CourseSection
Returns:
the title of the course section

setTitle

public void setTitle(String title)
Description copied from interface: CourseSection
Set the title of this course section.

Specified by:
setTitle in interface CourseSection
Parameters:
title -

getDescription

public String getDescription()
Description copied from interface: CourseSection
Get the description of this course section.

Specified by:
getDescription in interface CourseSection
Returns:
description of course section.

setDescription

public void setDescription(String description)
Description copied from interface: CourseSection
Set the descriptionof this course section.

Specified by:
setDescription in interface CourseSection
Parameters:
description -

getSectionNumber

public String getSectionNumber()
Description copied from interface: CourseSection
Get the course section number.

Specified by:
getSectionNumber in interface CourseSection
Returns:
course section number.

setSectionNumber

public void setSectionNumber(String sectionNumber)
Description copied from interface: CourseSection
Set the course section number.

Specified by:
setSectionNumber in interface CourseSection
Parameters:
sectionNumber -

getMaximumStudents

public Integer getMaximumStudents()
Description copied from interface: CourseSection
Get the maxiumum number of students permitted to enroll in this course section.

Specified by:
getMaximumStudents in interface CourseSection
Returns:
maxiumum number of students allowed

setMaximumStudents

public void setMaximumStudents(Integer maxStudents)
Description copied from interface: CourseSection
Set the maximum number of students permitted to entroll in this course section.

Specified by:
setMaximumStudents in interface CourseSection
Parameters:
maxStudents -

getSession

public Session getSession()
Description copied from interface: CourseSection
Get the session for this course section.

Specified by:
getSession in interface CourseSection
Returns:
term for this course section.

setSession

public void setSession(Session session)
Description copied from interface: CourseSection
Set the session for this course section.

Specified by:
setSession in interface CourseSection
Parameters:
session -

getSchedule

public String getSchedule()
Description copied from interface: CourseSection
Get the schedule of a course section.

Specified by:
getSchedule in interface CourseSection
Returns:
the schedule of the course section.

setSchedule

public void setSchedule(String schedule)
Description copied from interface: CourseSection
Set the schedule of this course section.

Specified by:
setSchedule in interface CourseSection
Parameters:
schedule -

getSectionEventsString

public String getSectionEventsString()
Set the value of the SECTIONEVENTS column.

Returns:
String

setSectionEventsString

public void setSectionEventsString(String sectionEventsString)

getSectionEvents

public Set getSectionEvents()
Description copied from interface: CourseSection
Get the set of event associated with this course section. Event objects are TBD at this time.

Specified by:
getSectionEvents in interface CourseSection
Returns:
a set of event associated with this course section

addSectionEvent

public void addSectionEvent(String sectionEvent)
Description copied from interface: CourseSection
Add an event given it's uuid.

Specified by:
addSectionEvent in interface CourseSection
Parameters:
sectionEvent -

removeSectionEvent

public void removeSectionEvent(String sectionEvent)
Description copied from interface: CourseSection
Remove an event given it's uuid.

Specified by:
removeSectionEvent in interface CourseSection
Parameters:
sectionEvent -

getLocation

public String getLocation()
Description copied from interface: CourseSection
Get the location of a course section.

Specified by:
getLocation in interface CourseSection
Returns:
the location of the course section.

setLocation

public void setLocation(String location)
Description copied from interface: CourseSection
Set the location of this course section.

Specified by:
setLocation in interface CourseSection
Parameters:
location -

getMeetingTime

public String getMeetingTime()
Description copied from interface: CourseSection
Get the meeting time of a course section.

Specified by:
getMeetingTime in interface CourseSection
Returns:
the meeting time of the course section.

setMeetingTime

public void setMeetingTime(String meetingTime)
Description copied from interface: CourseSection
Set the meeting time of this course section.

Specified by:
setMeetingTime in interface CourseSection
Parameters:
meetingTime -

getSectionType

public CourseSectionType getSectionType()
Description copied from interface: CourseSection
Get the course section type. This type could be a lecture, seminar, lab, recitation, studio, etc.

Specified by:
getSectionType in interface CourseSection
Returns:
course section type.

setSectionType

public void setSectionType(CourseSectionType type)
Description copied from interface: CourseSection
Set the course section type.

Specified by:
setSectionType in interface CourseSection
Parameters:
type -

getSectionStatus

public CourseSectionStatusType getSectionStatus()
Description copied from interface: CourseSection
Get the course section status type. This type could be open, closed, or wait-seted.

Specified by:
getSectionStatus in interface CourseSection
Returns:
course ection status type.

setSectionStatus

public void setSectionStatus(CourseSectionStatusType status)
Description copied from interface: CourseSection
Set the course section status type.

Specified by:
setSectionStatus in interface CourseSection
Parameters:
status -

getHoldingSection

public Boolean getHoldingSection()
Description copied from interface: CourseSection
Check to see if this is a holding section. True if this section is being used to hold students that will be re-assigned later.

Specified by:
getHoldingSection in interface CourseSection
Returns:
true if there is holding section

setHoldingSection

public void setHoldingSection(Boolean holdingSection)
Description copied from interface: CourseSection
Set the holding section flag.

Specified by:
setHoldingSection in interface CourseSection
Parameters:
holdingSection -

getParticipationSet

public Set getParticipationSet()

setParticipationSet

public void setParticipationSet(Set participationSet)

getLeaders

public Set getLeaders()
Description copied from interface: CourseSection
Get the set of participation for the instructors of this course. While most sections will have only one instructor, provisions are made for multiple instructors.

Specified by:
getLeaders in interface CourseSection
Returns:
Set of agent uuids for instructors.

addLeader

public void addLeader(ParticipationRecord participationRecord)
Description copied from interface: CourseSection
Add a participation record as an instructor of this section.

Specified by:
addLeader in interface CourseSection
Parameters:
participationRecord -

removeLeader

public void removeLeader(String agentUuid)
Description copied from interface: CourseSection
Remove a leader given an agent uuid. The participation record containing this uuid will be removed.

Specified by:
removeLeader in interface CourseSection
Parameters:
agentUuid -

getEnrollmentRecords

public Set getEnrollmentRecords()
Description copied from interface: CourseSection
Get the set of enrollment records for students enrolled in this section. Note that this set contains actual record, not uuids as is typical elsewhere.

Specified by:
getEnrollmentRecords in interface CourseSection
Returns:
Set of student enrollment records.

setEnrollmentRecords

public void setEnrollmentRecords(Set enrollmentSet)

addEnrollmentRecord

public void addEnrollmentRecord(EnrollmentRecord enrollmentRecord)
Description copied from interface: CourseSection
Add an enrollment record for a student enrolled in this section.

Specified by:
addEnrollmentRecord in interface CourseSection
Parameters:
enrollmentRecord -

removeEnrollmentRecord

public void removeEnrollmentRecord(EnrollmentRecord enrollmentRecord)
Description copied from interface: CourseSection
Remove the enrollment record of a student for this ection.

Specified by:
removeEnrollmentRecord in interface CourseSection
Parameters:
enrollmentRecord -

removeEnrollmentRecord

public void removeEnrollmentRecord(String agentUuid)

getEnrollmentStatus

public EnrollmentStatusType getEnrollmentStatus()
Description copied from interface: CourseSection
Get the enrollment status type.

Specified by:
getEnrollmentStatus in interface CourseSection
Returns:
enrollment status type

setEnrollmentStatus

public void setEnrollmentStatus(EnrollmentStatusType status)
Description copied from interface: CourseSection
Set the enrollment status type.

Specified by:
setEnrollmentStatus in interface CourseSection
Parameters:
status -

getOtherPeople

public Set getOtherPeople()
Description copied from interface: CourseSection
Get a set of other people associated with this course offering. This set might include teaching assistance, lab supervisors, translators, etc. The set elements are participation uuids.

Specified by:
getOtherPeople in interface CourseSection
Returns:
a Set of other people associated with this course offering

addOtherPerson

public void addOtherPerson(ParticipationRecord participant)
Description copied from interface: CourseSection
Add a person to the other set.

Specified by:
addOtherPerson in interface CourseSection
Parameters:
participant -

removeOtherPerson

public void removeOtherPerson(String agentUuid)
Description copied from interface: CourseSection
Remove a person from the other set given an agent uuid. The participation record associated with this uuid will be removed from the set of other people.

Specified by:
removeOtherPerson in interface CourseSection
Parameters:
agentUuid -

getCourseOffering

public String getCourseOffering()
Description copied from interface: CourseSection
Get the course offering uuid that this course section represents.

Specified by:
getCourseOffering in interface CourseSection
Returns:
course offering uuid.

setCourseOffering

public void setCourseOffering(String courseOfferingUuid)
Description copied from interface: CourseSection
Set the course offering uuid id that this course section represents.

Specified by:
setCourseOffering in interface CourseSection
Parameters:
courseOfferingUuid -

getParentId

public String getParentId()
Description copied from interface: CourseSection
Get the parent uuid of a course section.

Specified by:
getParentId in interface CourseSection
Returns:
the parent uuid of the course section.

setParentId

public void setParentId(String parentUuid)
Description copied from interface: CourseSection
Set the parentId of this course section.

Specified by:
setParentId in interface CourseSection
Parameters:
parentUuid -

getParentSection

public CourseSection getParentSection()

setParentSection

public void setParentSection(CourseSection parentSection)

getAllSubSections

public Set getAllSubSections()
Description copied from interface: CourseSection
Get a set of uuids of child sections derived from this course section. Each of these sections is a real class with a location, teacher, students, etc.

Specified by:
getAllSubSections in interface CourseSection
Returns:
Set of course section uuids.

getSubSectionSet

public Set getSubSectionSet()

setSubSectionSet

public void setSubSectionSet(Set subSectionSet)

getSubSectionsByType

public Set getSubSectionsByType(CourseSectionType type)
Description copied from interface: CourseSection
Get a set of uuids of child sections of a given type, derived from this course section. Each of these sections is a real class with a location, teacher, students, etc.

Specified by:
getSubSectionsByType in interface CourseSection
Returns:
Set of course section uuids.

getAllowSelfRegistration

public Boolean getAllowSelfRegistration()
Description copied from interface: CourseSection
Check to see if self-registration is allowed for this section. If true, then students may enroll or register themselves.

Specified by:
getAllowSelfRegistration in interface CourseSection
Returns:
true if self registration is allowed

setAllowSelfRegistration

public void setAllowSelfRegistration(Boolean allowSelfRegistration)
Description copied from interface: CourseSection
Set the self registration flag.

Specified by:
setAllowSelfRegistration in interface CourseSection
Parameters:
allowSelfRegistration -

getUuid

public String getUuid()
Description copied from interface: Persistable
All persistent objects must have a UUID.

Specified by:
getUuid in interface Persistable
Returns:
Returns the UUID for given object.

setUuid

public void setUuid(String uuid)

getCreatedBy

public String getCreatedBy()
Description copied from interface: Persistable
The Agent that created this persistent object.

Specified by:
getCreatedBy in interface Persistable
Returns:
UUID of the Agent that created this persistent object.

setCreatedBy

public void setCreatedBy(String createdBy)

getCreatedDate

public Date getCreatedDate()
Description copied from interface: Persistable
The time and date this persistent object was created.

Specified by:
getCreatedDate in interface Persistable
Returns:

setCreatedDate

public void setCreatedDate(Date createdDate)

getLastModifiedBy

public String getLastModifiedBy()
Description copied from interface: Persistable
The last Agent that modified the persistent state of this object.

Specified by:
getLastModifiedBy in interface Persistable
Returns:
UUID of Agent that made last modification.

setLastModifiedBy

public void setLastModifiedBy(String lastModifiedBy)

getLastModifiedDate

public Date getLastModifiedDate()
Description copied from interface: Persistable
The last time this object's persistent state was modified.

Specified by:
getLastModifiedDate in interface Persistable
Returns:

setLastModifiedDate

public void setLastModifiedDate(Date lastModifiedDate)

equals

public boolean equals(Object rhs)
Implementation of the equals comparison on the basis of equality of the primary key values.

Parameters:
rhs -
Returns:
boolean

hashCode

public int hashCode()
Implementation of the hashCode method conforming to the Bloch pattern with the exception of array properties (these are very unlikely primary key types).

Returns:
int

setScheduleEvent

public void setScheduleEvent(String scheduleEvent)
Description copied from interface: CourseSection
Set the schedule of this course section.

Specified by:
setScheduleEvent in interface CourseSection
Parameters:
scheduleEvent -

getScheduleEvent

public String getScheduleEvent()
Description copied from interface: CourseSection
Get the schedule of a course section.

Specified by:
getScheduleEvent in interface CourseSection
Returns:
the schedule of the course section.