|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AnnouncementDbPersister
This interface describes the set of methods that all database persisters for
Announcement 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.
| Nested Class Summary | |
|---|---|
static class |
AnnouncementDbPersister.Default
|
| 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 Announcement 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 Announcement identified by the given Id
value using the supplied connection. |
void |
persist(Announcement announcement)
Deprecated. Since 9.0. Use AnnouncementManager.save() instead. Saves the given announcement to the system, placing it at the top of the list of announcements for its context (ie, the course/org that it's created in, or the global announcement list if it's a system announcement). Some notes on usage:
|
void |
persist(Announcement announcement,
java.sql.Connection con)
Deprecated. Since 9.0. Use AnnouncementManager.save() instead. NOTE: The "con" parameter is no longer supported, and will be ignored. It uses the implicit context in all cases. Saves the given announcement to the system, placing it at the top of the list of announcements for its context (ie, the course/org that it's created in, or the global announcement list if it's a system announcement). Some notes on usage:
|
void |
persistSimple(Announcement announcement,
java.sql.Connection con)
Performs a simple persist of the given announcement; which is to say, it does not do any automatic reordering, nor does it register the announcement with Nautilus. |
void |
reposition(Id announcementId,
int newPosition)
A utility class that provides quick access to the AnnouncementDbPersister
instance associated with the default instance of the database BbPersistenceManager. |
void |
reposition(Id announcementId,
int newPosition,
java.sql.Connection con)
A utility class that provides quick access to the AnnouncementDbPersister
instance from the database using the supplied connection. |
| Methods inherited from interface blackboard.persist.Persister |
|---|
getAppVersion, init |
| Field Detail |
|---|
static final java.lang.String TYPE
BbPersistenceManager.getPersister(String).
| Method Detail |
|---|
@Deprecated
void persist(Announcement announcement)
throws ValidationException,
PersistenceException
announcement - The announcement to save
ValidationException
PersistenceException
@Deprecated
void persist(Announcement announcement,
java.sql.Connection con)
throws ValidationException,
PersistenceException
announcement - The announcement to savecon - Db connection. No longer supported.
ValidationException
PersistenceException
void persistSimple(Announcement announcement,
java.sql.Connection con)
throws ValidationException,
PersistenceException
announcement - The announcement to savecon - The db connection to use. May be null.
ValidationException
PersistenceException
void deleteById(Id id)
throws KeyNotFoundException,
PersistenceException
Announcement identified by the given Id
value using a connection from the associated persistence manager's
database container.
KeyNotFoundException - is not thrown. Depending on the database used, if a matching
Announcement 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
void deleteById(Id id,
java.sql.Connection con)
throws KeyNotFoundException,
PersistenceException
Announcement identified by the given Id
value using the supplied connection.
KeyNotFoundException - is not thrown. Depending on the database used, if a matching
Announcement 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
void reposition(Id announcementId,
int newPosition)
throws KeyNotFoundException,
PersistenceException
AnnouncementDbPersister
instance associated with the default instance of the database BbPersistenceManager.
Loader and/or Persister instances
within some scope, it will likely be more efficient to retrieve the default
database persistence manager directly, and then retrieve loader/persister
instances from it instead of making several calls to this and/or other
loader/persister utility classes.
KeyNotFoundException
PersistenceException
void reposition(Id announcementId,
int newPosition,
java.sql.Connection con)
throws KeyNotFoundException,
PersistenceException
AnnouncementDbPersister
instance from the database using the supplied connection.
Loader and/or Persister instances
within some scope, it will likely be more efficient to retrieve the default
database persistence manager directly, and then retrieve loader/persister
instances from it instead of making several calls to this and/or other
loader/persister utility classes.
KeyNotFoundException
PersistenceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||