blackboard.admin.persist.course
Interface EnrollmentPersister

All Superinterfaces:
Persister, blackboard.admin.snapshot.persist.SnapshotPersister<Enrollment>

public interface EnrollmentPersister
extends Persister, blackboard.admin.snapshot.persist.SnapshotPersister<Enrollment>

This interface describes the set of methods that all persisters for Enrollment objects must implement.

A persister allows an object to be stored (either inserted or updated) within the CMS system or to be deleted from the CMS system. Persisting methods are named according to the type of persistence that is performed.

Since:
Bb 6.0
See Also:
EnrollmentLoader, Enrollment

Nested Class Summary
static class EnrollmentPersister.Default
          A utility class that provides quick access to the Persister 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 insert(Enrollment objToSave)
          Inserts the supplied Enrollment.
 void remove(Enrollment obj)
          Removes the supplied Enrollment.
 void save(Enrollment objToSave)
          Inserts or updates the supplied Enrollment.
 void save(Enrollment objToSave, java.lang.String strSessionId)
          Inserts or updates the supplied Enrollment.
 void update(Enrollment objToSave)
          Updates the supplied Enrollment.
 
Methods inherited from interface blackboard.persist.Persister
getAppVersion, init
 
Methods inherited from interface blackboard.admin.snapshot.persist.SnapshotPersister
closeSession, createSession, createSession, remove, save, save
 

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.

See Also:
Constant Field Values
Method Detail

save

void save(Enrollment objToSave)
          throws PersistenceException,
                 blackboard.db.ConstraintViolationException,
                 ValidationException
Inserts or updates the supplied Enrollment.

Parameters:
objToSave - Enrollment object to be persisted.
Throws:
PersistenceException - Thrown if a failure occurs while saving object.
blackboard.db.ConstraintViolationException - Thrown in the unlikely situation where a constraint violation is detected when saving the Enrollment.
ValidationException - Thrown if target does not contain required indentifying information.

save

void save(Enrollment objToSave,
          java.lang.String strSessionId)
          throws PersistenceException,
                 ValidationException
Inserts or updates the supplied Enrollment.
Method used for persistence within the scope of a Snapshot Session. And should be bracketed by method calls SnapshotPersister.createSession(String) for initialization of the Snapshot process and SnapshotPersister.closeSession(String) for finalization. Failure to do this appropriately will result in a PersistenceException

Parameters:
objToSave - Enrollment object to be persisted.
strSessionId - Unique id associated with the Session targeted for the operation.
Throws:
PersistenceException - Thrown if a failure occurs while saving object.
ValidationException - Thrown if target does not contain required indentifying information.

insert

void insert(Enrollment objToSave)
            throws PersistenceException,
                   blackboard.db.ConstraintViolationException,
                   ValidationException
Inserts the supplied Enrollment.

Parameters:
objToSave - Enrollment object to be inserted.
Throws:
PersistenceException - Thrown if a failure occurs while inserting object.
blackboard.db.ConstraintViolationException - Thrown if a Enrollment object exists with provided batch uid, or course name.
ValidationException - Thrown if target Enrollment does not contain required indentifying information.

update

void update(Enrollment objToSave)
            throws PersistenceException,
                   blackboard.db.ConstraintViolationException,
                   KeyNotFoundException,
                   ValidationException
Updates the supplied Enrollment.

Parameters:
objToSave - Enrollment object to be updated.
Throws:
KeyNotFoundException - Thrown if Enrollment object could not be found with provided batch uid.
PersistenceException - Thrown if a failure occurs while updating object.
blackboard.db.ConstraintViolationException - Thrown if a Enrollment object exists with provided course name.
ValidationException - Thrown if target Enrollment does not contain required indentifying information.

remove

void remove(Enrollment obj)
            throws ValidationException,
                   KeyNotFoundException,
                   PersistenceException
Removes the supplied Enrollment.

Parameters:
obj - Enrollment object to be removed.
Throws:
KeyNotFoundException - Thrown if Enrollment object could not be found with provided batch uid.
ValidationException - Not thrown - validation not required for remove operation.
PersistenceException - Thrown if a failure occurs while removing object.


Copyright © 2012 Blackboard, Inc. All Rights Reserved.