blackboard.admin.persist.course
Interface OrganizationPersister

All Superinterfaces:
Persister

public interface OrganizationPersister
extends Persister

This interface describes the set of methods that all persisters for Organization 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
Author:
Raymond Peterson
See Also:
OrganizationLoader, Organization

Nested Class Summary
static class OrganizationPersister.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 changeKey(Organization obj, java.lang.String newKey)
          Changes the batch uid for Organization data.
 void clone(java.lang.String srcOrgBatchUid, java.lang.String tgtOrgBatchUid, CloneConfig cfg)
          Peforms a clone operation by copying content and attributes from the Organization to that specified as the target.
 void insert(Organization objToSave)
          Inserts the supplied Organization.
 void remove(Organization obj)
          Removes the supplied Organization.
 void save(Organization objToSave)
          Inserts or updates the supplied Organization.
 void save(Organization objToSave, java.lang.String strSessionId)
          Inserts or updates the supplied Organization.
 void update(Organization objToSave)
          Updates the supplied Organization.
 
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.

See Also:
Constant Field Values
Method Detail

save

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

Parameters:
objToSave - Organization object to be persisted.
Throws:
PersistenceException - Thrown if a failure occurs while saving object.
ConstraintViolationException - Thrown if a Organization object exists with provided course name.
ValidationException - Thrown if target does not contain required indentifying information.

save

void save(Organization objToSave,
          java.lang.String strSessionId)
          throws PersistenceException,
                 ValidationException
Inserts or updates the supplied Organization.
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 - Organization 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(Organization objToSave)
            throws PersistenceException,
                   ConstraintViolationException,
                   ValidationException
Inserts the supplied Organization.

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

update

void update(Organization objToSave)
            throws PersistenceException,
                   ConstraintViolationException,
                   KeyNotFoundException,
                   ValidationException
Updates the supplied Organization.

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

remove

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

Parameters:
obj - Organization object to be removed.
Throws:
KeyNotFoundException - Thrown if Organization object could not be found with provided batch uid.
ValidationException - Will never be thrown.
PersistenceException - Thrown if a failure occurs while removing object.

changeKey

void changeKey(Organization obj,
               java.lang.String newKey)
               throws PersistenceException,
                      ValidationException,
                      ConstraintViolationException,
                      KeyNotFoundException
Changes the batch uid for Organization data.

Parameters:
obj - Organization object to be updated.
newKey - New batch_uid to be associated with provided Organization object.
Throws:
KeyNotFoundException - Thrown if Organization object could not be found with provided batch uid.
PersistenceException - Thrown if a failure occurs while persisting object.
ConstraintViolationException - Thrown if a Organization object exists with batch_uid provided.
ValidationException - Thrown if target Organization does not contain required indentifying information.

clone

void clone(java.lang.String srcOrgBatchUid,
           java.lang.String tgtOrgBatchUid,
           CloneConfig cfg)
           throws PersistenceException,
                  KeyNotFoundException,
                  ValidationException,
                  ConstraintViolationException
Peforms a clone operation by copying content and attributes from the Organization to that specified as the target.

Parameters:
srcOrgBatchUid - Batch Uid which identifies the source Organization for the operation.
tgtOrgBatchUid - Batch Uid which identifies the target Organization for the operation.
cfg - CloneConfig instance used to identify what portions of the Organization is to be copied. Optional Null is interpreted as include all Optional Null is interpreted as ignore any hooks for status reporting
Throws:
PersistenceException - Thrown if a failure occurs while saving object.
ConstraintViolationException - Thrown if a Organization object exists with provided organization name.
KeyNotFoundException - Thrown if Organization object could not be found with provided batch uid.
ValidationException - Will never be thrown.