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

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

public class CourseOfferingImpl
extends Object
implements CourseOffering, Serializable

See Also:
Serialized Form

Constructor Summary
CourseOfferingImpl()
           
CourseOfferingImpl(String title, String description, String offeringNumber, String canonicalCourseUuid, SessionImpl session, CourseOfferingType type)
           
 
Method Summary
 void addDefaultLeader(ParticipationRecord participationRecord)
          Add a participation record as an instructor of this section.
 void addEquivalent(String equivalent)
          Add the course offering given by its uuid to the set of equivalent courses.
 void addOtherPerson(ParticipationRecord participant)
          Add a person to the other set.
 boolean equals(Object rhs)
          Implementation of the equals comparison on the basis of equality of the primary key values.
 Set getAggregatedEnrollments(CourseSectionType type)
          Get an aggregated set of all students enrolled in this course.
 Set getAllEnrollments()
          Get an aggregated set of all students enrolled of a given course section type (e.g. lecture, lab, seminar) in this course.
 String getCanonicalCourse()
          Get the uuid of the canonical course that this offering represents.
 Long getCourseOfferingId()
           
 Set getCourseSections()
          Get the set of course sections that represent this offering.
 String getCreatedBy()
          The Agent that created this persistent object.
 Date getCreatedDate()
          The time and date this persistent object was created.
 Set getDefaultLeaders()
          Get the set of participation for the instructors of a given course section type (e.g. lecture, lab, seminar) in this course.
 String getDefaultLocation()
          Get the location of a course section.
 String getDefaultMeetingTime()
          Get the default meeting time of a course section.
 String getDefaultSchedule()
          Get the default schedule of a course section.
 String getDescription()
          Get the description of this course offering.
 EnrollmentType getEnrollmentType()
          Get the entrollment type for this course.
 Set getEquivalents()
          Get a set of equivalent course offering uuids.
 String getEquivalentString()
          Return the value of the TOPICS column.
 Boolean getIsCrossListed()
           
 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.
 Integer getMaximumStudents()
          Get the maxiumum number of students permitted to enroll in this course offering.
 String getOfferingNumber()
          Get the course number.
 CourseOfferingStatusType getOfferingStatus()
          Get the course ofering status.
 CourseOfferingType getOfferingType()
          Get the course offering type.
 Set getOtherPeople()
          Get a set of other people associated with this course offering.
 Set getParticipationSet()
           
 Set getSectionsByType(CourseSectionType type)
          Get a set of uuids of sections of a given course section type, derived from this course offering.
 Session getSession()
          Get the term of this course offering.
 String getTitle()
          Get the title of a course offering as it might appear in a course catalog.
 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).
 Boolean isCrossListed()
          Return true if this course offering is cross listed.
 void removeCourseSection(String sectionUuid)
          Remove a course section from this offering set.
 void removeDefaultLeader(String agentUuid)
          Remove a leader given an agent uuid.
 void removeEquivalent(String equivalent)
          Remove the course offering given by its uuid from the set of equivalent courses.
 void removeOtherPerson(String agentUuid)
          Remove a person from the other set given an agent uuid.
 void setCanonicalCourse(String uuid)
          Set the uuid of the canonical course that this offering represents.
 void setCourseOfferingId(Long courseOfferingId)
           
 void setCourseSections(Set courseSectionSet)
           
 void setCreatedBy(String createdBy)
           
 void setCreatedDate(Date createdDate)
           
 void setDefaultLocation(String location)
          Set the default location of this course section.
 void setDefaultMeetingTime(String meetingTime)
          Set the default meeting time of this course section.
 void setDefaultSchedule(String schedule)
          Set the default schedule of this course section.
 void setDescription(String description)
          Set the description of this course offering.
 void setEnrollmentType(EnrollmentType type)
           
 void setEquivalentString(String equivalentString)
          Set the value of the Equivalent column.
 void setIsCrossListed(Boolean isCrossListed)
          Set cross listing flag.
 void setLastModifiedBy(String lastModifiedBy)
           
 void setLastModifiedDate(Date lastModifiedDate)
           
 void setMaximumStudents(Integer maxStudents)
          Set the maximum number of students permitted to entroll in this course offering.
 void setOfferingNumber(String offeringNumber)
          Set the offering number.
 void setOfferingStatus(CourseOfferingStatusType status)
          Set the course offering status type.
 void setOfferingType(CourseOfferingType type)
          Set the course offering type.
 void setParticipationSet(Set participationSet)
           
 void setSession(Session session)
          Set the term of this course offering.
 void setTitle(String title)
          Set the title of a course offering as it might appear in a course catalog.
 void setUuid(String uuid)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CourseOfferingImpl

public CourseOfferingImpl()

CourseOfferingImpl

public CourseOfferingImpl(String title,
                          String description,
                          String offeringNumber,
                          String canonicalCourseUuid,
                          SessionImpl session,
                          CourseOfferingType type)
Method Detail

getCourseOfferingId

public Long getCourseOfferingId()

setCourseOfferingId

public void setCourseOfferingId(Long courseOfferingId)

getTitle

public String getTitle()
Description copied from interface: CourseOffering
Get the title of a course offering as it might appear in a course catalog.

Specified by:
getTitle in interface CourseOffering
Returns:
the title of the course offering.

setTitle

public void setTitle(String title)
Description copied from interface: CourseOffering
Set the title of a course offering as it might appear in a course catalog.

Specified by:
setTitle in interface CourseOffering
Parameters:
title -

getDescription

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

Specified by:
getDescription in interface CourseOffering
Returns:
the desription of the course offering.

setDescription

public void setDescription(String description)
Description copied from interface: CourseOffering
Set the description of this course offering.

Specified by:
setDescription in interface CourseOffering
Parameters:
description -

getOfferingNumber

public String getOfferingNumber()
Description copied from interface: CourseOffering
Get the course number. There are no restrictions on how this number is formatted.

Specified by:
getOfferingNumber in interface CourseOffering
Returns:
offeringNnumber

setOfferingNumber

public void setOfferingNumber(String offeringNumber)
Description copied from interface: CourseOffering
Set the offering number. There are no restirctions on how this number is formatted.

Specified by:
setOfferingNumber in interface CourseOffering
Parameters:
offeringNumber -

getSession

public Session getSession()
Description copied from interface: CourseOffering
Get the term of this course offering.

Specified by:
getSession in interface CourseOffering
Returns:
the term

setSession

public void setSession(Session session)
Description copied from interface: CourseOffering
Set the term of this course offering.

Specified by:
setSession in interface CourseOffering
Parameters:
session -

getMaximumStudents

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

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

setMaximumStudents

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

Specified by:
setMaximumStudents in interface CourseOffering
Parameters:
maxStudents -

getDefaultLocation

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

Specified by:
getDefaultLocation in interface CourseOffering
Returns:
the default location of the course section.

setDefaultLocation

public void setDefaultLocation(String location)
Description copied from interface: CourseOffering
Set the default location of this course section.

Specified by:
setDefaultLocation in interface CourseOffering
Parameters:
location -

getDefaultMeetingTime

public String getDefaultMeetingTime()
Description copied from interface: CourseOffering
Get the default meeting time of a course section.

Specified by:
getDefaultMeetingTime in interface CourseOffering
Returns:
the meeting time of the course section.

setDefaultMeetingTime

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

Specified by:
setDefaultMeetingTime in interface CourseOffering
Parameters:
meetingTime -

getDefaultSchedule

public String getDefaultSchedule()
Description copied from interface: CourseOffering
Get the default schedule of a course section.

Specified by:
getDefaultSchedule in interface CourseOffering
Returns:
the schedule of the course section.

setDefaultSchedule

public void setDefaultSchedule(String schedule)
Description copied from interface: CourseOffering
Set the default schedule of this course section.

Specified by:
setDefaultSchedule in interface CourseOffering
Parameters:
schedule -

isCrossListed

public Boolean isCrossListed()
Description copied from interface: CourseOffering
Return true if this course offering is cross listed. A course is cross listed if the set of equivalent courses is non-empty.

Specified by:
isCrossListed in interface CourseOffering
Returns:
true if cross listed.

setIsCrossListed

public void setIsCrossListed(Boolean isCrossListed)
Description copied from interface: CourseOffering
Set cross listing flag.

Specified by:
setIsCrossListed in interface CourseOffering
Parameters:
isCrossListed -

getIsCrossListed

public Boolean getIsCrossListed()

getEquivalentString

public String getEquivalentString()
Return the value of the TOPICS column.

Returns:
String

setEquivalentString

public void setEquivalentString(String equivalentString)
Set the value of the Equivalent column.

Parameters:
equivalentString -

getEquivalents

public Set getEquivalents()
Description copied from interface: CourseOffering
Get a set of equivalent course offering uuids. This is one way to represent cross seting in a set of courses.

Specified by:
getEquivalents in interface CourseOffering
Returns:
Set of canonical course uuids.

addEquivalent

public void addEquivalent(String equivalent)
Description copied from interface: CourseOffering
Add the course offering given by its uuid to the set of equivalent courses.

Specified by:
addEquivalent in interface CourseOffering
Parameters:
equivalent -

removeEquivalent

public void removeEquivalent(String equivalent)
Description copied from interface: CourseOffering
Remove the course offering given by its uuid from the set of equivalent courses.

Specified by:
removeEquivalent in interface CourseOffering
Parameters:
equivalent -

getOfferingType

public CourseOfferingType getOfferingType()
Description copied from interface: CourseOffering
Get the course offering type. This type indicates what kind of offering is being made.

Specified by:
getOfferingType in interface CourseOffering
Returns:
course offering type.

setOfferingType

public void setOfferingType(CourseOfferingType type)
Description copied from interface: CourseOffering
Set the course offering type.

Specified by:
setOfferingType in interface CourseOffering
Parameters:
type -

getOfferingStatus

public CourseOfferingStatusType getOfferingStatus()
Description copied from interface: CourseOffering
Get the course ofering status. The course offering status might be open, closed, wait-seted, etc.

Specified by:
getOfferingStatus in interface CourseOffering
Returns:
status

setOfferingStatus

public void setOfferingStatus(CourseOfferingStatusType status)
Description copied from interface: CourseOffering
Set the course offering status type.

Specified by:
setOfferingStatus in interface CourseOffering
Parameters:
status -

getCanonicalCourse

public String getCanonicalCourse()
Description copied from interface: CourseOffering
Get the uuid of the canonical course that this offering represents.

Specified by:
getCanonicalCourse in interface CourseOffering
Returns:
uuid of canonical course

setCanonicalCourse

public void setCanonicalCourse(String uuid)
Description copied from interface: CourseOffering
Set the uuid of the canonical course that this offering represents.

Specified by:
setCanonicalCourse in interface CourseOffering
Parameters:
uuid -

getCourseSections

public Set getCourseSections()
Description copied from interface: CourseOffering
Get the set of course sections that represent this offering.

Specified by:
getCourseSections in interface CourseOffering
Returns:
Set of course sections

setCourseSections

public void setCourseSections(Set courseSectionSet)

removeCourseSection

public void removeCourseSection(String sectionUuid)
Description copied from interface: CourseOffering
Remove a course section from this offering set.

Specified by:
removeCourseSection in interface CourseOffering
Parameters:
sectionUuid -

getSectionsByType

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

Specified by:
getSectionsByType in interface CourseOffering
Returns:
Set of course section uuids.

getParticipationSet

public Set getParticipationSet()

setParticipationSet

public void setParticipationSet(Set participationSet)

getDefaultLeaders

public Set getDefaultLeaders()
Description copied from interface: CourseOffering
Get the set of participation for the instructors of a given course section type (e.g. lecture, lab, seminar) in this course. While most sections will have only one instructor, provisions are made for multiple instructors.

Specified by:
getDefaultLeaders in interface CourseOffering
Returns:
defaultLeaderSet

addDefaultLeader

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

Specified by:
addDefaultLeader in interface CourseOffering
Parameters:
participationRecord -

removeDefaultLeader

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

Specified by:
removeDefaultLeader in interface CourseOffering
Parameters:
agentUuid -

getOtherPeople

public Set getOtherPeople()
Description copied from interface: CourseOffering
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 CourseOffering
Returns:
otherPeopleSet

addOtherPerson

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

Specified by:
addOtherPerson in interface CourseOffering
Parameters:
participant -

removeOtherPerson

public void removeOtherPerson(String agentUuid)
Description copied from interface: CourseOffering
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 CourseOffering
Parameters:
agentUuid -

getAllEnrollments

public Set getAllEnrollments()
Description copied from interface: CourseOffering
Get an aggregated set of all students enrolled of a given course section type (e.g. lecture, lab, seminar) in this course. This is a set of Enrollment records drawn from sections under this offering. Aggregated enrollment is a simple way to find all people enrolled in any section based on this course offering.

Specified by:
getAllEnrollments in interface CourseOffering
Returns:
Set of enrollment records.

getAggregatedEnrollments

public Set getAggregatedEnrollments(CourseSectionType type)
Description copied from interface: CourseOffering
Get an aggregated set of all students enrolled in this course. This is a set of Enrollment records drawn from sections under this offering. Aggregated enrollment is a simple way to find all people enrolled in any section based on this course offering.

Specified by:
getAggregatedEnrollments in interface CourseOffering
Returns:
aggregated set of enrollment records.

getEnrollmentType

public EnrollmentType getEnrollmentType()
Description copied from interface: CourseOffering
Get the entrollment type for this course. Since a course offering enrollment is always an aggregate, this will always return an EnrollmentType of aggregate.

Specified by:
getEnrollmentType in interface CourseOffering
Returns:
entrollment type.

setEnrollmentType

public void setEnrollmentType(EnrollmentType type)

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