blackboard.persist.announcement
Interface AnnouncementDbLoader

All Superinterfaces:
Loader

public interface AnnouncementDbLoader
extends Loader

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

Loading methods are named according to the criteria used for loading and the type of load that is performed.

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

Nested Class Summary
static class AnnouncementDbLoader.Default
          A utility class that provides quick access to the AnnouncementDbLoader 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 loadAvailableByCourseIdAndUserId(Id courseId, Id userId, int numDaysBack, boolean showPerm)
          loadAvailableByCourseIdAndUserId Loads the list of all available announcements that pertain to the user identified by the given user id, within the course specified by the given courseId, within a given time period.
 BbList loadAvailableByCourseIdAndUserId(Id courseId, Id userId, int numDaysBack, boolean showPerm, java.sql.Connection con)
          loadAvailableByCourseIdAndUserId Loads the list of all available announcements that pertain to the user identified by the given user id, within the course specified by the given courseId, within a given time period using the supplied connection
 BbList loadAvailableByType(Announcement.Type type)
          Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type using a connection obtained through this object's database context.
 BbList loadAvailableByType(Announcement.Type type, boolean showPerm)
          Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type using a connection obtained through this object's database context.
 BbList loadAvailableByType(Announcement.Type type, java.sql.Connection con)
          Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type using the supplied connection.
 BbList loadAvailableByType(Announcement.Type type, int numDaysBack)
          Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type created or modified within the last n days, using a connection obtained through this object's database context.
 BbList loadAvailableByType(Announcement.Type type, int numDaysBack, boolean showPerm, java.sql.Connection con)
          Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type created or modified within the last n days, using the supplied connection.
 BbList loadAvailableByUserId(Id userId)
          Loads the list of all available announcements (system, course and organization) that pertain to the user identified by the given user Id, using a connection obtained through this object's database context.
 BbList loadAvailableByUserId(Id userId, java.sql.Connection con)
          Loads the list of all available announcements (system, course and organization) that pertain to the user identified by the given user Id, using the supplied connection.
 BbList loadAvailableByUserId(Id userId, int numDaysBack)
          Loads the list of all available announcements (system, course and organization) that pertain to the user identified by the given user Id, within a given time period, using a connection obtained through this object's database context.
 BbList loadAvailableByUserId(Id userId, int numDaysBack, java.sql.Connection con)
          Loads the list of all available announcements (system, course and organization) that pertain to the user identified by the given user Id, within a given time period, using the supplied connection.
 BbList loadByCourseId(Id courseId)
          Load the list of Announcement objects that currently exist for the course identified by the given course Id using a connection obtained through this object's database context.
 BbList loadByCourseId(Id courseId, java.sql.Connection con)
          Load the list of Announcement objects that currently exist for the course identified by the given course Id using the supplied connection.
 Announcement loadById(Id id)
          Load the Announcement with the given Id from the database using a connection obtained through this object's database context.
 Announcement loadById(Id id, java.sql.Connection con)
          Load the Announcement with the given Id from the database using the supplied connection.
 BbList loadByType(Announcement.Type type)
          Load the list of Announcement objects that currently exist of the type identified by the given Announcement.Type using a connection obtained through this object's database context.
 BbList loadByType(Announcement.Type type, java.sql.Connection con)
          Load the list of Announcement objects that currently exist of the type identified by the given Announcement.Type using the supplied connection.
 
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

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

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

loadById

Announcement loadById(Id id,
                      java.sql.Connection con)
                      throws KeyNotFoundException,
                             PersistenceException
Load the Announcement with the given Id from the database using the supplied connection.

Parameters:
id - the Id of the Announcement to be loaded
con - the Connection to use to perform the persistence. If left null, method will use default connection.
Throws:
KeyNotFoundException - if there is no Announcement in the database with the given Id
PersistenceException - if some other error occurs while loading the object

loadByType

BbList loadByType(Announcement.Type type)
                  throws KeyNotFoundException,
                         PersistenceException
Load the list of Announcement objects that currently exist of the type identified by the given Announcement.Type using a connection obtained through this object's database context.

Parameters:
type - the Announcement.Type of Announcement to be loaded
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadByType

BbList loadByType(Announcement.Type type,
                  java.sql.Connection con)
                  throws KeyNotFoundException,
                         PersistenceException
Load the list of Announcement objects that currently exist of the type identified by the given Announcement.Type using the supplied connection.

Parameters:
type - the Announcement.Type of Announcement to be loaded
con - the Connection to use to perform the persistence. If left null, method will use default connection.
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByType

BbList loadAvailableByType(Announcement.Type type,
                           boolean showPerm)
                           throws KeyNotFoundException,
                                  PersistenceException
Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type using a connection obtained through this object's database context.

Parameters:
type - the Announcement.Type of Announcement to be loaded
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByType

BbList loadAvailableByType(Announcement.Type type)
                           throws KeyNotFoundException,
                                  PersistenceException
Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type using a connection obtained through this object's database context.

Parameters:
type - the Announcement.Type of Announcement to be loaded
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByType

BbList loadAvailableByType(Announcement.Type type,
                           java.sql.Connection con)
                           throws KeyNotFoundException,
                                  PersistenceException
Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type using the supplied connection.

Parameters:
type - the Announcement.Type of Announcement to be loaded
con - the Connection to use to perform the persistence. If left null, method will use default connection.
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByType

BbList loadAvailableByType(Announcement.Type type,
                           int numDaysBack)
                           throws KeyNotFoundException,
                                  PersistenceException
Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type created or modified within the last n days, using a connection obtained through this object's database context.

Parameters:
type - the Announcement.Type of Announcement to be loaded
numDaysBack - the number of past days to search (from current date)
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByType

BbList loadAvailableByType(Announcement.Type type,
                           int numDaysBack,
                           boolean showPerm,
                           java.sql.Connection con)
                           throws KeyNotFoundException,
                                  PersistenceException
Load the list of Announcement objects currently available to the user of the type identified by the given Announcement.Type created or modified within the last n days, using the supplied connection.

Parameters:
type - the Announcement.Type of Announcement to be loaded
numDaysBack - the number of days worth of announcements to load (-1 = all, 0 = today, 1 = today and yesterday, etc.)
con - the Connection to use to perform the persistence. If left null, method will use default connection.
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadByCourseId

BbList loadByCourseId(Id courseId)
                      throws KeyNotFoundException,
                             PersistenceException
Load the list of Announcement objects that currently exist for the course identified by the given course Id using a connection obtained through this object's database context.

Parameters:
id - the Id of the Course from which announcements are loaded
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadByCourseId

BbList loadByCourseId(Id courseId,
                      java.sql.Connection con)
                      throws KeyNotFoundException,
                             PersistenceException
Load the list of Announcement objects that currently exist for the course identified by the given course Id using the supplied connection.

Parameters:
id - the Id of the Course from which announcements are loaded
con - the Connection to use to perform the persistence. If left null, method will use default connection.
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByUserId

BbList loadAvailableByUserId(Id userId)
                             throws KeyNotFoundException,
                                    PersistenceException
Loads the list of all available announcements (system, course and organization) that pertain to the user identified by the given user Id, using a connection obtained through this object's database context.

Parameters:
userId - the Id of the target user
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByUserId

BbList loadAvailableByUserId(Id userId,
                             java.sql.Connection con)
                             throws KeyNotFoundException,
                                    PersistenceException
Loads the list of all available announcements (system, course and organization) that pertain to the user identified by the given user Id, using the supplied connection.

Parameters:
userId - the Id of the target user
con - the Connection to use to perform the persistence. If left null, method will use default connection.
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByUserId

BbList loadAvailableByUserId(Id userId,
                             int numDaysBack)
                             throws KeyNotFoundException,
                                    PersistenceException
Loads the list of all available announcements (system, course and organization) that pertain to the user identified by the given user Id, within a given time period, using a connection obtained through this object's database context.

Parameters:
userId - the Id of the target user
numDaysBack - the number of days worth of announcements to load (-1 = all, 0 = today, 1 = today and yesterday, etc.)
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByUserId

BbList loadAvailableByUserId(Id userId,
                             int numDaysBack,
                             java.sql.Connection con)
                             throws KeyNotFoundException,
                                    PersistenceException
Loads the list of all available announcements (system, course and organization) that pertain to the user identified by the given user Id, within a given time period, using the supplied connection.

Parameters:
userId - the Id of the target user
numDaysBack - the number of days worth of announcements to load (-1 = all, 0 = today, 1 = today and yesterday, etc.)
con - the Connection to use to perform the persistence. If left null, method will use default connection.
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadAvailableByCourseIdAndUserId

BbList loadAvailableByCourseIdAndUserId(Id courseId,
                                        Id userId,
                                        int numDaysBack,
                                        boolean showPerm)
                                        throws KeyNotFoundException,
                                               PersistenceException
loadAvailableByCourseIdAndUserId Loads the list of all available announcements that pertain to the user identified by the given user id, within the course specified by the given courseId, within a given time period.

Parameters:
courseId - the {@link Id) of the target course
userId - the Id of the target user
numDaysBack - the number of days worth of announcements to load (-1 = all, 0 = today, 1 = today and yesterday, etc.)
Returns:
BbList
Throws:
KeyNotFoundException
PersistenceException

loadAvailableByCourseIdAndUserId

BbList loadAvailableByCourseIdAndUserId(Id courseId,
                                        Id userId,
                                        int numDaysBack,
                                        boolean showPerm,
                                        java.sql.Connection con)
                                        throws KeyNotFoundException,
                                               PersistenceException
loadAvailableByCourseIdAndUserId Loads the list of all available announcements that pertain to the user identified by the given user id, within the course specified by the given courseId, within a given time period using the supplied connection

Parameters:
courseId - the {@link Id) of the target course
userId - the Id of the target user
numDaysBack - the number of days worth of announcements to load (-1 = all, 0 = today, 1 = today and yesterday, etc.)
con - the Connection to use to perform the persistence. If left null, method will use default connection.
Returns:
BbList
Throws:
KeyNotFoundException
PersistenceException


Copyright © 2003 Blackboard, Inc. All Rights Reserved.