blackboard.persist.course
Interface GroupMembershipDbPersister

All Superinterfaces:
Persister

public interface GroupMembershipDbPersister
extends Persister

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

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

Since:
Bb 6.0
See Also:
as a preferred way to do persistence operation on GroupMembership

Nested Class Summary
static class GroupMembershipDbPersister.Default
          A utility class that provides quick access to the GroupMembershipDbPersister 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 deleteById(Id id)
          Deletes the GroupMembership 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 GroupMembership identified by the given Id value using the supplied connection.
 void persist(GroupMembership groupMembership)
          Inserts or updates the supplied GroupMembership using a connection from the associated persistence manager's database container.
 void persist(GroupMembership groupMembership, java.sql.Connection con)
          Inserts or updates the supplied GroupMembership 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(GroupMembership groupMembership)
             throws ValidationException,
                    PersistenceException
Inserts or updates the supplied GroupMembership 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.

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(GroupMembership groupMembership,
             java.sql.Connection con)
             throws ValidationException,
                    PersistenceException
Inserts or updates the supplied GroupMembership 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.

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 GroupMembership identified by the given Id value using a connection from the associated persistence manager's database container.

Throws:
KeyNotFoundException - is not thrown. Depending on the database used, if a matching GroupMembership 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 GroupMembership identified by the given Id value using the supplied connection.

Throws:
KeyNotFoundException - is not thrown. Depending on the database used, if a matching GroupMembership 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 2011 Blackboard, Inc. All Rights Reserved.