blackboard.persist.discussionboard
Interface UserMsgStateDbPersister

All Superinterfaces:
Persister

public interface UserMsgStateDbPersister
extends Persister

UserMsgStateDbPersister

Since:
Bb 7.0
Version:
Revision: #1 Date: 2005-4-20

Nested Class Summary
static class UserMsgStateDbPersister.Default
          A utility class that provides quick access to the UsrMsgStateDbPersister instance associated with the default instance of the database BbPersistenceManager.
 
Field Summary
static java.lang.String TYPE
           
 
Method Summary
 void deleteById(Id id)
          Deletes the UserMsgState 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 UserMsgState identified by the given Id value using the supplied connection.
 void deleteByMsgMainId(Id id)
          Deletes the UserMsgState identified by the given message id value using a connection from the associated persistence manager's database container.
 void deleteByMsgMainId(Id id, java.sql.Connection con)
          Deletes the UserMsgState identified by the given message id value using a supplied connection.
 void deleteByUserId(Id id)
          Deletes the UserMsgState identified by the given user id value using a connection from the associated persistence manager's database container.
 void deleteByUserId(Id id, java.sql.Connection con)
          Deletes the UserMsgState identified by the given user id value using a supplied connection.
 void incrementMessagesReadCount(java.util.List<Id> messageIds, Id userId)
          Increments the read count for the specified messages and user id using a connection from the associated persistence manager's database container.
 void incrementMessagesReadCount(java.util.List<Id> messageIds, Id userId, java.sql.Connection con)
          Increments the read count for the specified messages and user id using the specified database connection.
 void persist(UserMsgState UsrMsgState)
          Inserts or updates the supplied UserMsgState using a connection from the associated persistence manager's database container.
 void persist(UserMsgState UsrMsgState, java.sql.Connection con)
          Inserts or updates the supplied UserMsgState using the supplied connection.
 void updateReadStatusByMsgId(boolean read, Id msgId, Id userId)
          Updates the read status of the specified message for the specified user using a connection from the associated persistence manager's database container.
 void updateReadStatusByMsgId(boolean read, Id msgId, Id userId, java.sql.Connection con)
          Updates the read status of the specified message for the specified user using the specified database connection.
 void updateReadStatusToUnreadForAllUsers(Id msgId)
          Updates the read status to unread for all users for the specified message using a connection from the associated persistence manager's database connection.
 void updateReadStatusToUnreadForAllUsers(Id msgId, java.sql.Connection con)
          Updates the read status to unread for all users for the specified message using the specified database connection.
 void updateThreadReadStatusByTopMsgId(boolean read, Id topMsgId, Id userId)
          Updates the read status for every message in the specified thread using a connection from the associated persistence manager's database container.
 void updateThreadReadStatusByTopMsgId(boolean read, Id topMsgId, Id userId, java.sql.Connection con)
          Updates the read status for every message in the specified thread using the specified database connection If no UserMsgState records exist for the messages/user mapping, and the read status is being set to "true" new records will be created.
 
Methods inherited from interface blackboard.persist.Persister
getAppVersion, init
 

Field Detail

TYPE

static final java.lang.String TYPE
See Also:
Constant Field Values
Method Detail

persist

void persist(UserMsgState UsrMsgState)
             throws ValidationException,
                    PersistenceException
Inserts or updates the supplied UserMsgState 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:
PersistenceException - if some other exception happens while persisting the object.
ValidationException

persist

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

updateReadStatusByMsgId

void updateReadStatusByMsgId(boolean read,
                             Id msgId,
                             Id userId)
                             throws PersistenceException
Updates the read status of the specified message for the specified user using a connection from the associated persistence manager's database container. If no UserMsgState record exists for this message/user mapping, and the read status is "true" one will be created.

Parameters:
read - whether the message is to be set "read"
msgId - the Id of the message
userId - the Id of the current user
Throws:
PersistenceException - if some exception occurs while updating the status
Since:
Bb 7.3

updateReadStatusByMsgId

void updateReadStatusByMsgId(boolean read,
                             Id msgId,
                             Id userId,
                             java.sql.Connection con)
                             throws PersistenceException
Updates the read status of the specified message for the specified user using the specified database connection. If no UserMsgState record exists for this message/user mapping, and the read status is "true" one will be created.

Parameters:
read - whether the message is to be set "read"
msgId - the Id of the message
userId - the Id of the current user
Throws:
PersistenceException - if some exception occurs while updating the status
Since:
Bb 7.3

updateThreadReadStatusByTopMsgId

void updateThreadReadStatusByTopMsgId(boolean read,
                                      Id topMsgId,
                                      Id userId)
                                      throws PersistenceException
Updates the read status for every message in the specified thread using a connection from the associated persistence manager's database container. If no UserMsgState records exist for the messages/user mapping, and the read status is being set to "true" new records will be created.

Parameters:
read - whether the message is to be set "read"
topMsgId - the Id of the top-level message in the thread
userId - the Id of the current user
Throws:
PersistenceException - if some exception occurs while updating the status
Since:
Bb 7.3

updateThreadReadStatusByTopMsgId

void updateThreadReadStatusByTopMsgId(boolean read,
                                      Id topMsgId,
                                      Id userId,
                                      java.sql.Connection con)
                                      throws PersistenceException
Updates the read status for every message in the specified thread using the specified database connection If no UserMsgState records exist for the messages/user mapping, and the read status is being set to "true" new records will be created.

Parameters:
read - whether the message is to be set "read"
topMsgId - the Id of the top-level message in the thread
userId - the Id of the current user
Throws:
PersistenceException - if some exception occurs while updating the status
Since:
Bb 7.3

incrementMessagesReadCount

void incrementMessagesReadCount(java.util.List<Id> messageIds,
                                Id userId)
                                throws PersistenceException
Increments the read count for the specified messages and user id using a connection from the associated persistence manager's database container.

Parameters:
messageIds - List of ids of the messages to increment the read count for
userId - the Id of the current user
Throws:
PersistenceException - if some exception occurs while updating the count
Since:
Bb 7.3

incrementMessagesReadCount

void incrementMessagesReadCount(java.util.List<Id> messageIds,
                                Id userId,
                                java.sql.Connection con)
                                throws PersistenceException
Increments the read count for the specified messages and user id using the specified database connection.

Parameters:
messageIds - List of ids of the messages to increment the read count for
userId - the Id of the current user
Throws:
PersistenceException - if some exception occurs while updating the count
Since:
Bb 7.3

updateReadStatusToUnreadForAllUsers

void updateReadStatusToUnreadForAllUsers(Id msgId)
                                         throws PersistenceException
Updates the read status to unread for all users for the specified message using a connection from the associated persistence manager's database connection.

Parameters:
msgId - the Id of the message to set as unread for all users
Throws:
PersistenceException - if some exception occurs while updating the status
Since:
Bb 7.3

updateReadStatusToUnreadForAllUsers

void updateReadStatusToUnreadForAllUsers(Id msgId,
                                         java.sql.Connection con)
                                         throws PersistenceException
Updates the read status to unread for all users for the specified message using the specified database connection.

Parameters:
msgId - the Id of the message to set as unread for all users
Throws:
PersistenceException - if some exception occurs while updating the status
Since:
Bb 7.3

deleteById

void deleteById(Id id)
                throws KeyNotFoundException,
                       PersistenceException
Deletes the UserMsgState identified by the given Id value using a connection from the associated persistence manager's database container.

Throws:
KeyNotFoundException - if an object with the given Id value can not be found
PersistenceException - if some other exception happens during the delete operation

deleteById

void deleteById(Id id,
                java.sql.Connection con)
                throws KeyNotFoundException,
                       PersistenceException
Deletes the UserMsgState identified by the given Id value using the supplied connection.

Throws:
KeyNotFoundException - if an object with the given Id value can not be found
PersistenceException - if some other exception happens during the delete operation

deleteByUserId

void deleteByUserId(Id id)
                    throws KeyNotFoundException,
                           PersistenceException
Deletes the UserMsgState identified by the given user id value using a connection from the associated persistence manager's database container.

Throws:
KeyNotFoundException - if an object with the given user id value can not be found
PersistenceException - if some other exception happens during the delete operation

deleteByUserId

void deleteByUserId(Id id,
                    java.sql.Connection con)
                    throws KeyNotFoundException,
                           PersistenceException
Deletes the UserMsgState identified by the given user id value using a supplied connection.

Throws:
KeyNotFoundException - if an object with the given user Id value can not be found
PersistenceException - if some other exception happens during the delete operation

deleteByMsgMainId

void deleteByMsgMainId(Id id)
                       throws KeyNotFoundException,
                              PersistenceException
Deletes the UserMsgState identified by the given message id value using a connection from the associated persistence manager's database container.

Throws:
KeyNotFoundException - if an object with the given message id value can not be found.
PersistenceException - if some other exception happens during the delete operation.

deleteByMsgMainId

void deleteByMsgMainId(Id id,
                       java.sql.Connection con)
                       throws KeyNotFoundException,
                              PersistenceException
Deletes the UserMsgState identified by the given message id value using a supplied connection.

Throws:
KeyNotFoundException - if an object with the given message id value can not be found.
PersistenceException - if some other exception happens during the delete operation.


Copyright © 2003 Blackboard, Inc. All Rights Reserved.