blackboard.persist.user
Interface UserRoleDbLoader

All Superinterfaces:
Loader

public interface UserRoleDbLoader
extends Loader

This interface describes the set of methods that all database loaders for UserRole objects must implement. UserRole objects represent a user's secondary institution roles.

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 6.3
Version:
$Revision: #1 $ $Date: 2005/06/27 $

Nested Class Summary
static class UserRoleDbLoader.Default
          A utility class that provides quick access to the UserRoleDbLoader 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
 UserRole loadById(Id id)
          Load the UserRole with the given Id from the database in a lightweight fashion using a connection obtained through this object's database context.
 UserRole loadById(Id id, java.sql.Connection con)
          Load the UserRole with the given Id from the database in a lightweight fashion using the supplied connection.
 BbList loadByPortalRoleId(Id portalRoleId)
          Load all UserRole objects with the given portal role from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList loadByPortalRoleId(Id portalRoleId, java.sql.Connection con)
          Load all UserRole objects with the given portal role from the database in a lightweight fashion using the supplied connection.
 BbList loadByUserId(Id userId)
          Load the list of UserRole objects belonging to the given user (identified by id) using a connection obtained through this object's database context.
 BbList loadByUserId(Id userId, java.sql.Connection con)
          Load the list of UserRole objects belonging to the given user (identified by id) using the supplied connection.
 UserRole loadByUserIdAndPortalRoleId(Id userId, Id portalRoleId)
          Load the UserRole object with the given user id and institution role from the database in a lightweight fashion using a connection obtained through this object's database context.
 UserRole loadByUserIdAndPortalRoleId(Id userId, Id portalRoleId, java.sql.Connection con)
          Load the UserRole object with the given user id and institution role from the database in a lightweight fashion 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

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

loadById

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

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

loadByUserId

BbList loadByUserId(Id userId)
                    throws KeyNotFoundException,
                           PersistenceException
Load the list of UserRole objects belonging to the given user (identified by id) using a connection obtained through this object's database context.

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

loadByUserId

BbList loadByUserId(Id userId,
                    java.sql.Connection con)
                    throws KeyNotFoundException,
                           PersistenceException
Load the list of UserRole objects belonging to the given user (identified by id) using the supplied connection.

Parameters:
userId - the Id of the User whose roles 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 User

loadByPortalRoleId

BbList loadByPortalRoleId(Id portalRoleId)
                          throws KeyNotFoundException,
                                 PersistenceException
Load all UserRole objects with the given portal role from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
portalRoleId - the Id of the PortalRole that we should load UserRole objects from
Throws:
KeyNotFoundException - if the provided User.InstRole is invalid
PersistenceException - if some other error occurs while loading the object

loadByPortalRoleId

BbList loadByPortalRoleId(Id portalRoleId,
                          java.sql.Connection con)
                          throws KeyNotFoundException,
                                 PersistenceException
Load all UserRole objects with the given portal role from the database in a lightweight fashion using the supplied connection.

Parameters:
portalRoleId - the Id of the PortalRole that we should load UserRole objects from
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if the provided module PortalRole is invalid
PersistenceException - if some other error occurs while loading the object

loadByUserIdAndPortalRoleId

UserRole loadByUserIdAndPortalRoleId(Id userId,
                                     Id portalRoleId)
                                     throws KeyNotFoundException,
                                            PersistenceException
Load the UserRole object with the given user id and institution role from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
userId - the Id of the User whose roles should be loaded
portalRoleId - the Id of the PortalRole that we should load UserRole objects from
Throws:
KeyNotFoundException - if the provided PortalRole is invalid
PersistenceException - if some other error occurs while loading the object

loadByUserIdAndPortalRoleId

UserRole loadByUserIdAndPortalRoleId(Id userId,
                                     Id portalRoleId,
                                     java.sql.Connection con)
                                     throws KeyNotFoundException,
                                            PersistenceException
Load the UserRole object with the given user id and institution role from the database in a lightweight fashion using the supplied connection. Load all UserRole objects with the given user id and institution role from the database in a

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


Copyright © 2003 Blackboard, Inc. All Rights Reserved.