blackboard.persist.course
Interface CourseDbLoader

All Superinterfaces:
Loader

public interface CourseDbLoader
extends Loader

This interface describes the set of methods that all database loaders for Course objects must implement.

Loading methods are named according to the criteria used for loading and the type of load that is performed. Loading operations can be either "lightweight" or "heavyweight". Lightweight loads load only those values directly associated with a data object (the immediate properties of an object). Heavyweight loads load those values directly associated with an object as well as the values of those objects directly contained by the object. Heavyweight loads are optimized to be as efficient as possible, but because more data is loaded performance will be slower than that of lightweight loads. As a result, lightweight load should be performed whenever possible.

Since:
Bb 5.5
Version:
$Revision: #1 $ $Date: 2005/06/27 $

Nested Class Summary
static class CourseDbLoader.Default
          A utility class that provides quick access to the CourseDbLoader instance associated with the default instance of the database BbPersistenceManager.
 
Field Summary
static java.lang.String TYPE
          Type used to obtain an instance of the class configured to provide the implementation for this interface.
 
Method Summary
 BbList loadAllByServiceLevel(Course.ServiceLevel sLevel)
          Load all course objects in the system with the given Course.ServiceLevel value in a light-weight fashion using a connection obtained through this object's database context.
 BbList loadAllByServiceLevel(Course.ServiceLevel sLevel, java.sql.Connection con)
          Load all course objects in the system with the given Course.ServiceLevel value in a light-weight fashion using the supplied connection.
 BbList loadAllCourses()
          Load all course objects in the system in a light-weight fashion using a connection obtained through this object's database context.
 BbList loadAllCourses(java.sql.Connection con)
          Load all course objects in the system in a light-weight fashion using the supplied connection.
 Course loadByBatchUid(java.lang.String batchUid)
          Load the Course with the given batch uid value from the database in a light- weight fashion using a connection obtained through this object's database context.
 Course loadByBatchUid(java.lang.String batchUid, java.sql.Connection con)
          Load the Course with the given batch uid value from the database in a light- weight fashion using the supplied connection.
 Course loadByBatchUid(java.lang.String batchUid, java.sql.Connection con, boolean bHeavy)
          Load the Course with the given batch uid value from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 Course loadByCourseId(java.lang.String courseId)
          Load the Course with the given course id (not pk) value from the database in a lightweight fashion using a connection obtained through this object's database context.
 Course loadByCourseId(java.lang.String courseId, java.sql.Connection con)
          Load the Course with the given course id (not pk) value from the database in a lightweight fashion using the supplied connection.
 Course loadByCourseId(java.lang.String courseId, java.sql.Connection con, boolean bHeavy)
          Load the Course with the given course id (not pk) from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 BbList loadByDataSourceBatchUid(java.lang.String dsBatchUid)
          Loads the lists of Courses associated with the datasource (identified by the given batch uid) from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList loadByDataSourceBatchUid(java.lang.String dsBatchUid, java.sql.Connection con)
          Loads the lists of Courses associated with the datasource (identified by the given batch uid) from the database in a lightweight fashion using the suppplied connection.
 Course loadById(Id id)
          Load the Course with the given Id from the database in a lightweight fashion using a connection obtained through this object's database context.
 Course loadById(Id id, java.sql.Connection con)
          Load the Course with the given Id from the database in a lightweight fashion using the supplied connection.
 Course loadById(Id id, java.sql.Connection con, boolean bHeavy)
          Load the Course with the given Id from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 BbList loadByUserId(Id userId)
          Load the list of Course objects in a lightweight fashion in which the given user (identified by id) is enrolled using a connection obtained through this object's database context.
 BbList loadByUserId(Id userId, java.sql.Connection con)
          Load the list of Course objects in a lightweight fashion in which the given user (identified by id) is enrolled using the supplied connection.
 BbList loadByUserId(Id userid, java.sql.Connection con, boolean bHeavy)
          Load the list of Course objects in the specified fashion (lightweight or heavyweight) in which the given user (identified by id) is enrolled using the supplied connection.
 BbList loadByUserIdAndCourseMembershipRole(Id userId, CourseMembership.Role role)
          Load the list of Course objects in a lightweight fashion in which the given user (identified by id) is enrolled with a specific course based role using a connection obtained through this object's database context.
 BbList loadByUserIdAndCourseMembershipRole(Id userId, CourseMembership.Role role, java.sql.Connection con)
          Load the list of Course objects in a lightweight fashion in which the given user (identified by id) is enrolled with a specific course based role using the supplied connection.
 BbList loadByUserIdAndCourseMembershipRole(Id userid, CourseMembership.Role role, java.sql.Connection con, boolean bHeavy)
          Load the list of Course objects in the specified fashion (lightweight or heavyweight) in which the given user (identified by id) with a specific course based role is enrolled using the supplied connection.
 BbList loadTemplates()
          Load all course objects in the system with a course registry flag indicating they are course templates.
 BbList loadTemplates(java.sql.Connection con)
          Load all course objects in the system with a course registry flag indicating they are course templates.
 
Methods inherited from interface blackboard.persist.Loader
getAppVersion, init
 

Field Detail

TYPE

static final java.lang.String TYPE
Type used to obtain an instance of the class configured to provide the implementation for this interface. Used when making a call to BbPersistenceManager.getLoader(String)

See Also:
Constant Field Values
Method Detail

loadById

Course loadById(Id id)
                throws KeyNotFoundException,
                       PersistenceException
Load the Course with the given Id from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
id - the Id of the Course that should be loaded
Throws:
KeyNotFoundException - if there is no Course in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadById

Course loadById(Id id,
                java.sql.Connection con)
                throws KeyNotFoundException,
                       PersistenceException
Load the Course with the given Id from the database in a lightweight fashion using the supplied connection.

Parameters:
id - the Id of the Course that should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if there is no Course in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadById

Course loadById(Id id,
                java.sql.Connection con,
                boolean bHeavy)
                throws KeyNotFoundException,
                       PersistenceException
Load the Course with the given Id from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

Parameters:
id - the Id of the Course that should be loaded
con - the Connection to use to perform the load. Can be null.
bHeavy - a boolean value denoting whether a "heavy" load should be performed.
Throws:
KeyNotFoundException - if there is no Course in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadByCourseId

Course loadByCourseId(java.lang.String courseId)
                      throws KeyNotFoundException,
                             PersistenceException
Load the Course with the given course id (not pk) value from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
courseId - the string-based unique id of the Course that should be loaded
Throws:
KeyNotFoundException - if there is no course in the database with the given course id
PersistenceException - if some other error occurs while loading the object

loadByCourseId

Course loadByCourseId(java.lang.String courseId,
                      java.sql.Connection con)
                      throws KeyNotFoundException,
                             PersistenceException
Load the Course with the given course id (not pk) value from the database in a lightweight fashion using the supplied connection.

Parameters:
courseId - the string-based unique id of the Course that should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if there is no course in the database with the given course id
PersistenceException - if some other error occurs while loading the object

loadByCourseId

Course loadByCourseId(java.lang.String courseId,
                      java.sql.Connection con,
                      boolean bHeavy)
                      throws KeyNotFoundException,
                             PersistenceException
Load the Course with the given course id (not pk) from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

Parameters:
courseId - the string-based unique id of the Course that should be loaded
con - the Connection to use to perform the load. Can be null.
bHeavy - a boolean value denoting whether a "heavy" load should be performed.
Throws:
KeyNotFoundException - if there is no course in the database with the given course id
PersistenceException - if some other error occurs while loading the object

loadByUserId

BbList loadByUserId(Id userId)
                    throws KeyNotFoundException,
                           PersistenceException
Load the list of Course objects in a lightweight fashion in which the given user (identified by id) is enrolled using a connection obtained through this object's database context.

Parameters:
userId - the Id of the User whose courses should be loaded
Throws:
KeyNotFoundException - if the provided user id is invalid
PersistenceException - if some other error occurs while loading the object

loadByUserId

BbList loadByUserId(Id userId,
                    java.sql.Connection con)
                    throws KeyNotFoundException,
                           PersistenceException
Load the list of Course objects in a lightweight fashion in which the given user (identified by id) is enrolled using the supplied connection.

Parameters:
userId - the Id of the User whose courses should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if the provided user id is invalid
PersistenceException - if some other error occurs while loading the object

loadByUserId

BbList loadByUserId(Id userid,
                    java.sql.Connection con,
                    boolean bHeavy)
                    throws KeyNotFoundException,
                           PersistenceException
Load the list of Course objects in the specified fashion (lightweight or heavyweight) in which the given user (identified by id) is enrolled using the supplied connection.

Parameters:
userId - the Id of the User whose courses should be loaded
con - the Connection to use to perform the load. Can be null.
bHeavy - a boolean value denoting whether a "heavy" load should be performed.
Throws:
KeyNotFoundException - if the provided user id is invalid
PersistenceException - if some other error occurs while loading the object

loadByUserIdAndCourseMembershipRole

BbList loadByUserIdAndCourseMembershipRole(Id userId,
                                           CourseMembership.Role role)
                                           throws KeyNotFoundException,
                                                  PersistenceException
Load the list of Course objects in a lightweight fashion in which the given user (identified by id) is enrolled with a specific course based role using a connection obtained through this object's database context.

Parameters:
userId - the Id of the User whose courses should be loaded
role - the CourseMembership.Role of the User.
Throws:
KeyNotFoundException - if the provided user id is invalid
PersistenceException - if some other error occurs while loading the object

loadByUserIdAndCourseMembershipRole

BbList loadByUserIdAndCourseMembershipRole(Id userId,
                                           CourseMembership.Role role,
                                           java.sql.Connection con)
                                           throws KeyNotFoundException,
                                                  PersistenceException
Load the list of Course objects in a lightweight fashion in which the given user (identified by id) is enrolled with a specific course based role using the supplied connection.

Parameters:
userId - the Id of the User whose courses should be loaded
role - the CourseMembership.Role of the User.
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if the provided user id is invalid
PersistenceException - if some other error occurs while loading the object

loadByUserIdAndCourseMembershipRole

BbList loadByUserIdAndCourseMembershipRole(Id userid,
                                           CourseMembership.Role role,
                                           java.sql.Connection con,
                                           boolean bHeavy)
                                           throws KeyNotFoundException,
                                                  PersistenceException
Load the list of Course objects in the specified fashion (lightweight or heavyweight) in which the given user (identified by id) with a specific course based role is enrolled using the supplied connection.

Parameters:
userId - the Id of the User whose courses should be loaded
role - the CourseMembership.Role of the User.
con - the Connection to use to perform the load. Can be null.
bHeavy - a boolean value denoting whether a "heavy" load should be performed.
Throws:
KeyNotFoundException - if the provided user id is invalid
PersistenceException - if some other error occurs while loading the object

loadByBatchUid

Course loadByBatchUid(java.lang.String batchUid)
                      throws KeyNotFoundException,
                             PersistenceException
Load the Course with the given batch uid value from the database in a light- weight fashion using a connection obtained through this object's database context.

Parameters:
batchUid - the batch uid of the Course that should be loaded
Throws:
KeyNotFoundException - if there is no course in the database with the given batch uid
PersistenceException - if some other error occurs while loading the object

loadByBatchUid

Course loadByBatchUid(java.lang.String batchUid,
                      java.sql.Connection con)
                      throws KeyNotFoundException,
                             PersistenceException
Load the Course with the given batch uid value from the database in a light- weight fashion using the supplied connection.

Parameters:
batchUid - the batch uid of the Course that should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if there is no course in the database with the given batch uid
PersistenceException - if some other error occurs while loading the object

loadByBatchUid

Course loadByBatchUid(java.lang.String batchUid,
                      java.sql.Connection con,
                      boolean bHeavy)
                      throws KeyNotFoundException,
                             PersistenceException
Load the Course with the given batch uid value from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

Parameters:
batchUid - the batch uid of the Course that should be loaded
con - the Connection to use to perform the load. Can be null.
bHeavy - a boolean value denoting whether a "heavy" load should be performed.
Throws:
KeyNotFoundException - if there is no course in the database with the given batch uid
PersistenceException - if some other error occurs while loading the object

loadByDataSourceBatchUid

BbList loadByDataSourceBatchUid(java.lang.String dsBatchUid)
                                throws KeyNotFoundException,
                                       PersistenceException
Loads the lists of Courses associated with the datasource (identified by the given batch uid) from the database in a lightweight fashion using a connection obtained through this object's database context. Courses are loaded without regard to their "row status" value.

Parameters:
dsBatchUid - the data source batch uid of the Course that should be loaded
Throws:
KeyNotFoundException - if the provided batch uid is invalid
PersistenceException - if some other error occurs while loading the object

loadByDataSourceBatchUid

BbList loadByDataSourceBatchUid(java.lang.String dsBatchUid,
                                java.sql.Connection con)
                                throws KeyNotFoundException,
                                       PersistenceException
Loads the lists of Courses associated with the datasource (identified by the given batch uid) from the database in a lightweight fashion using the suppplied connection. Courses are loaded without regard to their "row status" value.

Parameters:
dsBatchUid - the data source batch uid of the Course that should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if the provided batch uid is invalid
PersistenceException - if some other error occurs while loading the object

loadAllCourses

BbList loadAllCourses()
                      throws KeyNotFoundException,
                             PersistenceException
Load all course objects in the system in a light-weight fashion using a connection obtained through this object's database context.
This method loads all course objects contained in the system, regardless of their service level value. The result is that this method will return all "courses" and "organizations" in the system. If you wish to load only those course objects with a particular service level, please use the method loadAllByServiceLevel(Course.ServiceLevel) instead.
This method has the possibility of returning large amounts of data. As such, use of this method should not be abused.

Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadAllCourses

BbList loadAllCourses(java.sql.Connection con)
                      throws KeyNotFoundException,
                             PersistenceException
Load all course objects in the system in a light-weight fashion using the supplied connection.
This method loads all course objects contained in the system, regardless of their service level value. The result is that this method will return all "courses" and "organizations" in the system. If you wish to load only those course objects with a particular service level, please use the method loadAllByServiceLevel(Course.ServiceLevel,Connection) instead.
This method has the possibility of returning large amounts of data. As such, use of this method should not be abused.

Parameters:
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadAllByServiceLevel

BbList loadAllByServiceLevel(Course.ServiceLevel sLevel)
                             throws KeyNotFoundException,
                                    PersistenceException
Load all course objects in the system with the given Course.ServiceLevel value in a light-weight fashion using a connection obtained through this object's database context.
This method has the possibility of returning large amounts of data. As such, use of this method should not be abused.

Parameters:
sLevel - the Course.ServiceLevel of the course objects that should be loaded
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadAllByServiceLevel

BbList loadAllByServiceLevel(Course.ServiceLevel sLevel,
                             java.sql.Connection con)
                             throws KeyNotFoundException,
                                    PersistenceException
Load all course objects in the system with the given Course.ServiceLevel value in a light-weight fashion using the supplied connection.
This method has the possibility of returning large amounts of data. As such, use of this method should not be abused.

Parameters:
sLevel - the Course.ServiceLevel of the course objects that should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadTemplates

BbList loadTemplates()
                     throws KeyNotFoundException,
                            PersistenceException
Load all course objects in the system with a course registry flag indicating they are course templates.
This method has the possibility of returning large amounts of data. As such, use of this method should not be abused.

Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadTemplates

BbList loadTemplates(java.sql.Connection con)
                     throws KeyNotFoundException,
                            PersistenceException
Load all course objects in the system with a course registry flag indicating they are course templates.
This method has the possibility of returning large amounts of data. As such, use of this method should not be abused.

Parameters:
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object


Copyright © 2003 Blackboard, Inc. All Rights Reserved.