blackboard.persist.user
Interface UserDbLoader

All Superinterfaces:
Loader

public interface UserDbLoader
extends Loader

This interface describes the set of methods that all database loaders for User 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: 10 $ $Date: 1/09/02 1:54p $

Nested Class Summary
static class UserDbLoader.Default
          A utility class that provides quick access to the UserDbLoader 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
 User loadByBatchUid(java.lang.String batchUid)
          Load the User with the given batch uid value from the database in a light- weight fashion using a connection obtained through this object's database context.
 User loadByBatchUid(java.lang.String batchUid, java.sql.Connection con)
          Load the User with the given batch uid value from the database in a light- weight fashion using the supplied connection.
 User loadByBatchUid(java.lang.String batchUid, java.sql.Connection con, boolean bHeavy)
          Load the User with the given batch uid from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 BbList loadByCourseId(Id courseId)
          Load all users that are enrolled in the given course from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList loadByCourseId(Id courseId, java.sql.Connection con)
          Load all users that are enrolled in the given course from the database in a lightweight fashion using the supplied connection.
 BbList loadByCourseId(Id courseId, java.sql.Connection con, boolean bHeavy)
          Load all users that are enrolled in the given course from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 BbList loadByGroupId(Id groupId)
          Load all users that are enrolled in the given group from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList loadByGroupId(Id groupId, java.sql.Connection con)
          Load all users that are enrolled in the given group from the database in a lightweight fashion using the supplied connection.
 BbList loadByGroupId(Id groupId, java.sql.Connection con, boolean bHeavy)
          Load all users that are enrolled in the given group from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 User loadById(Id id)
          Load the User with the given Id from the database in a lightweight fashion using a connection obtained through this object's database context.
 User loadById(Id id, java.sql.Connection con)
          Load the User with the given Id from the database in a lightweight fashion using the supplied connection.
 User loadById(Id id, java.sql.Connection con, boolean bHeavy)
          Load the User with the given Id from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 User loadByUserName(java.lang.String userName)
          Load the User with the given username from the database in a lightweight fashion using a connection obtained through this object's database context.
 User loadByUserName(java.lang.String userName, java.sql.Connection con)
          Load the User with the given username from the database in a lightweight fashion using the supplied connection.
 User loadByUserName(java.lang.String userName, java.sql.Connection con, boolean bHeavy)
          Load the User with the given username from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 User loadGuestUser()
          Load the "guest" user using a connection obtained through this object's database context.
 BbList loadObservedByObserverId(Id observerId)
          Load all users that are/can be observed by the given observer (identified by their user id) in a lightweight fashion using a connection obtained through this object's database context.
 BbList loadObservedByObserverId(Id observerId, java.sql.Connection con)
          Load all users that are/can be observed by the given observer (identified by their user id) in a lightweight fashion using the supplied connection.
 BbList loadObservedByObserverId(Id observerId, java.sql.Connection con, boolean bHeavy)
          Load all users that are/can be observed by the given observer (identified by their user id) in the specified fashion using the supplied connection.
 
Methods inherited from interface blackboard.persist.Loader
getAppVersion, init
 

Field Detail

TYPE

public 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

public User loadById(Id id)
              throws KeyNotFoundException,
                     PersistenceException
Load the User 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 User that should be loaded
Throws:
KeyNotFoundException - if there is no User in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadById

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

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

loadById

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

Parameters:
id - the Id of the User 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 User in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadByUserName

public User loadByUserName(java.lang.String userName)
                    throws KeyNotFoundException,
                           PersistenceException
Load the User with the given username from the database in a lightweight fashion using a connection obtained through this object's database context.

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

loadByUserName

public User loadByUserName(java.lang.String userName,
                           java.sql.Connection con)
                    throws KeyNotFoundException,
                           PersistenceException
Load the User with the given username from the database in a lightweight fashion using the supplied connection.

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

loadByUserName

public User loadByUserName(java.lang.String userName,
                           java.sql.Connection con,
                           boolean bHeavy)
                    throws KeyNotFoundException,
                           PersistenceException
Load the User with the given username from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

Parameters:
userName - the username of the User 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 User in the database with the given username
PersistenceException - if some other error occurs while loading the object

loadByCourseId

public BbList loadByCourseId(Id courseId)
                      throws KeyNotFoundException,
                             PersistenceException
Load all users that are enrolled in the given course from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
courseId - the Id of the Course that we should load enrolled users from
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadByCourseId

public BbList loadByCourseId(Id courseId,
                             java.sql.Connection con)
                      throws KeyNotFoundException,
                             PersistenceException
Load all users that are enrolled in the given course from the database in a lightweight fashion using the supplied connection.

Parameters:
courseId - the Id of the Course that we should load enrolled users from
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if the provided course id is invalid
PersistenceException - if some other error occurs while loading the object

loadByCourseId

public BbList loadByCourseId(Id courseId,
                             java.sql.Connection con,
                             boolean bHeavy)
                      throws KeyNotFoundException,
                             PersistenceException
Load all users that are enrolled in the given course from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

Parameters:
courseId - the Id of the Course that we should load enrolled users from
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 course id is invalid
PersistenceException - if some other error occurs while loading the object

loadByGroupId

public BbList loadByGroupId(Id groupId)
                     throws KeyNotFoundException,
                            PersistenceException
Load all users that are enrolled in the given group from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
groupId - the Id of the Group that we should load enrolled users from
Throws:
KeyNotFoundException - if the provided group id is invalid
PersistenceException - if some other error occurs while loading the object

loadByGroupId

public BbList loadByGroupId(Id groupId,
                            java.sql.Connection con)
                     throws KeyNotFoundException,
                            PersistenceException
Load all users that are enrolled in the given group from the database in a lightweight fashion using the supplied connection.

Parameters:
groupId - the Id of the Group that we should load enrolled users from
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if the provided group id is invalid
PersistenceException - if some other error occurs while loading the object

loadByGroupId

public BbList loadByGroupId(Id groupId,
                            java.sql.Connection con,
                            boolean bHeavy)
                     throws KeyNotFoundException,
                            PersistenceException
Load all users that are enrolled in the given group from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

Parameters:
groupId - the Id of the Group that we should load enrolled users from
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 group id is invalid
PersistenceException - if some other error occurs while loading the object

loadByBatchUid

public User loadByBatchUid(java.lang.String batchUid)
                    throws KeyNotFoundException,
                           PersistenceException
Load the User 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 User that should be loaded
Throws:
KeyNotFoundException - if there is no User in the database with the given batch uid
PersistenceException - if some other error occurs while loading the object

loadByBatchUid

public User loadByBatchUid(java.lang.String batchUid,
                           java.sql.Connection con)
                    throws KeyNotFoundException,
                           PersistenceException
Load the User 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 User that should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if there is no User in the database with the given batch uid
PersistenceException - if some other error occurs while loading the object

loadByBatchUid

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

Parameters:
batchUid - the batch uid of the User 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 User in the database with the given batch uid
PersistenceException - if some other error occurs while loading the object

loadObservedByObserverId

public BbList loadObservedByObserverId(Id observerId)
                                throws KeyNotFoundException,
                                       PersistenceException
Load all users that are/can be observed by the given observer (identified by their user id) in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
observerId - the Id of the User (observer) that we should load the list of observed users for
Throws:
KeyNotFoundException - if the provided observer user id is invalid
PersistenceException - if some other error occurs while loading the object

loadObservedByObserverId

public BbList loadObservedByObserverId(Id observerId,
                                       java.sql.Connection con)
                                throws KeyNotFoundException,
                                       PersistenceException
Load all users that are/can be observed by the given observer (identified by their user id) in a lightweight fashion using the supplied connection.

Parameters:
observerId - the Id of the User (observer) that we should load the list of observed users for
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if the provided observer user id is invalid
PersistenceException - if some other error occurs while loading the object

loadObservedByObserverId

public BbList loadObservedByObserverId(Id observerId,
                                       java.sql.Connection con,
                                       boolean bHeavy)
                                throws KeyNotFoundException,
                                       PersistenceException
Load all users that are/can be observed by the given observer (identified by their user id) in the specified fashion using the supplied connection.

Parameters:
observerId - the Id of the User (observer) that we should load the list of observed users for
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 observer user id is invalid
PersistenceException - if some other error occurs while loading the object

loadGuestUser

public User loadGuestUser()
                   throws KeyNotFoundException,
                          PersistenceException
Load the "guest" user using a connection obtained through this object's database context.

Throws:
KeyNotFoundException - if the guest user can not be found
PersistenceException - if an error occurs while loading the User


Copyright © 2003 Blackboard, Inc. All Rights Reserved.