blackboard.persist.content
Interface ContentFileDbLoader

All Superinterfaces:
Loader

public interface ContentFileDbLoader
extends Loader

This interface describes the set of methods that all database loaders for ContentFile 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.
Content objects, many of the load criteria are identical to those used in loading Content.

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

Nested Class Summary
static class ContentFileDbLoader.Default
          A utility class that provides quick access to the ContentFileDbLoader 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 loadByContentFolderId(Id folderId)
          Load the list of ContentFile objects that are referenced by children of the specified ContentFolder (identified by Id) from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList loadByContentFolderId(Id folderId, java.sql.Connection con)
          Load the list of ContentFile objects that are referenced by children of the specified ContentFolder (identified by Id) from the database in a lightweight fashion using the supplied connection.
 BbList loadByContentFolderId(Id folderId, java.sql.Connection con, boolean bHeavy)
          Load the list of ContentFile objects that are referenced by children of the specified ContentFolder (identified by Id) in the specified fashion (lightweight or heavyweight) using the supplied connection.
 BbList loadByContentId(Id id)
          Load the list of ContentFile objects associated with the given piece of Content (identifed by Id) from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList loadByContentId(Id id, java.sql.Connection con)
          Load the list of ContentFile objects associated with the given piece of Content (identifed by Id) from the database in a lightweight fashion using the supplied connection.
 BbList loadByContentId(Id id, java.sql.Connection con, boolean bHeavy, boolean bDeep)
          Load the list of ContentFile objects associated with the given piece of Content (identifed by Id) from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 ContentFile loadById(Id id)
          Load the ContentFile with the given Id from the database in a lightweight fashion using a connection obtained through this object's database context.
 ContentFile loadById(Id id, java.sql.Connection con)
          Load the ContentFile with the given Id from the database in a lightweight fashion using the supplied connection.
 ContentFile loadById(Id id, java.sql.Connection con, boolean bHeavy)
          Load the ContentFile with the given Id from the database in the specified fashion (lightweight or heavyweight) 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

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

loadById

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

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

loadById

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

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

loadByContentFolderId

BbList loadByContentFolderId(Id folderId)
                             throws KeyNotFoundException,
                                    PersistenceException
Load the list of ContentFile objects that are referenced by children of the specified ContentFolder (identified by Id) from the database in a lightweight fashion using a connection obtained through this object's database context. This is a "shallow" load in that only the content files referenced by immediate children of the given folder are loaded.

This method is most useful for rendering the contents of a folder or lesson (i.e., loading folder contents, including the set of referenced file objects).

Parameters:
folderId - the Id of the ContentFolder that contains the children content items for which content files should be loaded
Throws:
KeyNotFoundException - if the given ContentFolder Id is invalid
PersistenceException - if some other error occurs while loading the object

loadByContentFolderId

BbList loadByContentFolderId(Id folderId,
                             java.sql.Connection con)
                             throws KeyNotFoundException,
                                    PersistenceException
Load the list of ContentFile objects that are referenced by children of the specified ContentFolder (identified by Id) from the database in a lightweight fashion using the supplied connection. This is a "shallow" load in that only the content files referenced by immediate children of the given folder are loaded.

This method is most useful for rendering the contents of a folder or lesson (i.e., loading folder contents, including the set of referenced file objects).

Parameters:
folderId - the Id of the ContentFolder that contains the children content items for which content files should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if the given ContentFolder Id is invalid
PersistenceException - if some other error occurs while loading the object

loadByContentFolderId

BbList loadByContentFolderId(Id folderId,
                             java.sql.Connection con,
                             boolean bHeavy)
                             throws KeyNotFoundException,
                                    PersistenceException
Load the list of ContentFile objects that are referenced by children of the specified ContentFolder (identified by Id) in the specified fashion (lightweight or heavyweight) using the supplied connection. This is a "shallow" load in that only the content files referenced by immediate children of the given folder are loaded.

This method is most useful for rendering the contents of a folder or lesson (i.e., loading folder contents, including the set of referenced file objects).

Parameters:
folderId - the Id of the ContentFolder that contains the children content items for which content files 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 given ContentFolder Id is invalid
PersistenceException - if some other error occurs while loading the object

loadByContentId

BbList loadByContentId(Id id)
                       throws KeyNotFoundException,
                              PersistenceException
Load the list of ContentFile objects associated with the given piece of Content (identifed by Id) from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
id - the Id of the Content item for which content files should be loaded
Throws:
KeyNotFoundException - if the given Content Id is invalid
PersistenceException - if some other error occurs while loading the object

loadByContentId

BbList loadByContentId(Id id,
                       java.sql.Connection con)
                       throws KeyNotFoundException,
                              PersistenceException
Load the list of ContentFile objects associated with the given piece of Content (identifed by Id) from the database in a lightweight fashion using the supplied connection.

Parameters:
id - the Id of the Content item for which content files should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if the given Content Id is invalid
PersistenceException - if some other error occurs while loading the object

loadByContentId

BbList loadByContentId(Id id,
                       java.sql.Connection con,
                       boolean bHeavy,
                       boolean bDeep)
                       throws KeyNotFoundException,
                              PersistenceException
Load the list of ContentFile objects associated with the given piece of Content (identifed by Id) from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

If deep loading is specified, the list returned will include files for all descendants of the Content item specified. The list order will not necessarily reflect the ordering of the tree, so additional processing may be required to match up the objects.

Parameters:
id - the Id of the Content item for which content files 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.
bDeep - a boolean value denoting whether a "deep" load should be performed (load files for all descendant content items).
Throws:
KeyNotFoundException - if the given Content Id is invalid
PersistenceException - if some other error occurs while loading the object


Copyright © 2003 Blackboard, Inc. All Rights Reserved.