blackboard.persist.content
Interface EntityContentFileDbPersister

All Superinterfaces:
Persister

public interface EntityContentFileDbPersister
extends Persister

Since:
Bb 7.2
Version:
$Revision: #1 $ $Date: 2007/06/27 $

Nested Class Summary
static class EntityContentFileDbPersister.Default
          A utility class that provides quick access to the ContentDbPersister 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
 void deleteByEntityId(Id id)
          Deletes the Content identified by the given entity Id value using a connection from the associated persistence manager's database container.
 void deleteByEntityId(Id id, java.sql.Connection con)
          Deletes the Content identified by the given entity Id value using the supplied connection.
 void deleteById(Id id)
          Deletes the Content identified by the given Id value using a connection from the associated persistence manager's database container.
 void deleteById(Id id, java.sql.Connection con)
          Deletes the Content identified by the given Id value using the supplied connection.
 void persist(EntityContentFile target)
          Inserts or updates the supplied Content using a connection from the associated persistence manager's database container.
 void persist(EntityContentFile target, java.sql.Connection con)
          Inserts or updates the supplied Content using the supplied connection.
 
Methods inherited from interface blackboard.persist.Persister
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.getPersister(String).

See Also:
Constant Field Values
Method Detail

persist

void persist(EntityContentFile target)
             throws ValidationException,
                    PersistenceException
Inserts or updates the supplied Content using a connection from the associated persistence manager's database container. If the object's Id is set and is associated with the same container, then an update is done, otherwise a new object is inserted.

Parameters:
target - Object to store.
Throws:
ValidationException - if the object is not in a consistent state to be persisted.
PersistenceException - if some other exception happens while persisting the object.

persist

void persist(EntityContentFile target,
             java.sql.Connection con)
             throws ValidationException,
                    PersistenceException
Inserts or updates the supplied Content using the supplied connection. The connection must be to the same database as is used by the associated persistence manager. If the object's Id is set and is associated with this persistence manager's same container, then an update is done, otherwise a new object is inserted.

Parameters:
target - Object to store.
con - Database connection to use. This may be null
Throws:
ValidationException - if the object is not in a consistent state to be persisted.
PersistenceException - if some other exception happens while persisting the object.

deleteById

void deleteById(Id id)
                throws KeyNotFoundException,
                       PersistenceException
Deletes the Content identified by the given Id value using a connection from the associated persistence manager's database container. Note that deletes are always "deep". That means that if the object specified by id is a folder or lesson, all contained objects will also be deleted.

Parameters:
id - Id of the object to delete.
Throws:
KeyNotFoundException - is not thrown. Depending on the database used, if a matching ContentFile does not exist a PersistenceException might be thrown or no exception will be thrown but no rows will be affected.
PersistenceException - if some other exception happens during the delete operation

deleteById

void deleteById(Id id,
                java.sql.Connection con)
                throws KeyNotFoundException,
                       PersistenceException
Deletes the Content identified by the given Id value using the supplied connection. Note that deletes are always "deep". That means that if the object specified by id is a folder or lesson, all contained objects will also be deleted.

Parameters:
id - id of the object to delete
con - Database connection to use. This may be null
Throws:
KeyNotFoundException - is not thrown. Depending on the database used, if a matching ContentFile does not exist a PersistenceException might be thrown or no exception will be thrown but no rows will be affected.
PersistenceException - if some other exception happens during the delete operation

deleteByEntityId

void deleteByEntityId(Id id)
                      throws KeyNotFoundException,
                             PersistenceException
Deletes the Content identified by the given entity Id value using a connection from the associated persistence manager's database container. Note that deletes are always "deep". That means that if the object specified by id is a folder or lesson, all contained objects will also be deleted.

Parameters:
id - Id of the object to delete.
Throws:
KeyNotFoundException - is not thrown. Depending on the database used, if a matching ContentFile does not exist a PersistenceException might be thrown or no exception will be thrown but no rows will be affected.
PersistenceException - if some other exception happens during the delete operation

deleteByEntityId

void deleteByEntityId(Id id,
                      java.sql.Connection con)
                      throws KeyNotFoundException,
                             PersistenceException
Deletes the Content identified by the given entity Id value using the supplied connection. Note that deletes are always "deep". That means that if the object specified by id is a folder or lesson, all contained objects will also be deleted.

Parameters:
id - id of the object to delete
con - Database connection to use. This may be null
Throws:
KeyNotFoundException - is not thrown. Depending on the database used, if a matching ContentFile does not exist a PersistenceException might be thrown or no exception will be thrown but no rows will be affected.
PersistenceException - if some other exception happens during the delete operation


Copyright © 2003 Blackboard, Inc. All Rights Reserved.