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 Userobjects 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 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 loadByCardNumberFamilyNameGivenName(java.lang.String cardNumber, java.lang.String familyName, java.lang.String givenName, java.sql.Connection con)
           
 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 loadByEmailAddressFamilyNameGivenName(java.lang.String emailAddress, java.lang.String familyName, java.lang.String givenName)
          Load the BbList of users with the given email address from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList loadByEmailAddressFamilyNameGivenName(java.lang.String emailAddress, java.lang.String familyName, java.lang.String givenName, java.sql.Connection con)
          These three loaders are only used by the guest deposit module using different guest identifiers
 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.
 BbList loadByPrimaryPortalRoleId(Id portalRoleId)
          Load all users by the given portalRole id in a lightweight fashion using a connection obtained through this object's database context.
 BbList loadByPrimaryPortalRoleId(Id portalRoleId, java.sql.Connection con)
          Load all users by the given portalRole id in a lightweight fashion using the supplied connection.
 BbList loadByPrimaryPortalRoleId(Id portalRoleId, java.sql.Connection con, boolean bHeavy)
          Load all users by the given portalRole id in the specified fashion using the supplied connection.
 BbList loadByStudentIdFamilyNameGivenName(java.lang.String studentId, java.lang.String familyName, java.lang.String givenName, java.sql.Connection con)
           
 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.
 BbList searchByUserName(java.lang.String userName)
           
 
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

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 Idof the Userthat 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

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 Idof the Userthat should be loaded
con - the Connectionto 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

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 Idof the Userthat should be loaded
con - the Connectionto 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

loadByEmailAddressFamilyNameGivenName

BbList loadByEmailAddressFamilyNameGivenName(java.lang.String emailAddress,
                                             java.lang.String familyName,
                                             java.lang.String givenName)
                                             throws KeyNotFoundException,
                                                    PersistenceException
Load the BbList of users with the given email address from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
email - the email address of the Userthat 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

loadByEmailAddressFamilyNameGivenName

BbList loadByEmailAddressFamilyNameGivenName(java.lang.String emailAddress,
                                             java.lang.String familyName,
                                             java.lang.String givenName,
                                             java.sql.Connection con)
                                             throws KeyNotFoundException,
                                                    PersistenceException
These three loaders are only used by the guest deposit module using different guest identifiers

Throws:
KeyNotFoundException
PersistenceException

loadByStudentIdFamilyNameGivenName

BbList loadByStudentIdFamilyNameGivenName(java.lang.String studentId,
                                          java.lang.String familyName,
                                          java.lang.String givenName,
                                          java.sql.Connection con)
                                          throws KeyNotFoundException,
                                                 PersistenceException
Throws:
KeyNotFoundException
PersistenceException

loadByCardNumberFamilyNameGivenName

BbList loadByCardNumberFamilyNameGivenName(java.lang.String cardNumber,
                                           java.lang.String familyName,
                                           java.lang.String givenName,
                                           java.sql.Connection con)
                                           throws KeyNotFoundException,
                                                  PersistenceException
Throws:
KeyNotFoundException
PersistenceException

searchByUserName

BbList searchByUserName(java.lang.String userName)
                        throws KeyNotFoundException,
                               PersistenceException
Throws:
KeyNotFoundException
PersistenceException

loadByUserName

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 Userthat 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

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 Userthat should be loaded
con - the Connectionto 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

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 Userthat should be loaded
con - the Connectionto 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

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 Idof the Coursethat 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

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 Idof the Coursethat we should load enrolled users from
con - the Connectionto 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

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 Idof the Coursethat we should load enrolled users from
con - the Connectionto 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

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 Idof the Groupthat 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

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 Idof the Groupthat we should load enrolled users from
con - the Connectionto 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

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 Idof the Groupthat we should load enrolled users from
con - the Connectionto 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

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 Userthat 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

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 Userthat should be loaded
con - the Connectionto 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

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 Userthat should be loaded
con - the Connectionto 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

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 Idof 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

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 Idof the User(observer) that we should load the list of observed users for
con - the Connectionto 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

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 Idof the User(observer) that we should load the list of observed users for
con - the Connectionto 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

loadByPrimaryPortalRoleId

BbList loadByPrimaryPortalRoleId(Id portalRoleId)
                                 throws KeyNotFoundException,
                                        PersistenceException
Load all users by the given portalRole id in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
portalRoleId - the Idof the Userthat we should load the list of users for
Throws:
KeyNotFoundException - if the provided observer user id is invalid
PersistenceException - if some other error occurs while loading the object

loadByPrimaryPortalRoleId

BbList loadByPrimaryPortalRoleId(Id portalRoleId,
                                 java.sql.Connection con)
                                 throws KeyNotFoundException,
                                        PersistenceException
Load all users by the given portalRole id in a lightweight fashion using the supplied connection.

Parameters:
portalRoleId - the Idof the Userthat we should load the list of users for
con - the Connectionto 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

loadByPrimaryPortalRoleId

BbList loadByPrimaryPortalRoleId(Id portalRoleId,
                                 java.sql.Connection con,
                                 boolean bHeavy)
                                 throws KeyNotFoundException,
                                        PersistenceException
Load all users by the given portalRole id in the specified fashion using the supplied connection.

Parameters:
portalRoleId - the Idof the Userthat we should load the list of users for
con - the Connectionto 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

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.