blackboard.persist.discussionboard
Interface MessageDbLoader

All Superinterfaces:
Loader

public interface MessageDbLoader
extends Loader

This interface describes the set of methods that all database loaders for Message objects must implement.

Loading methods are named according to the criteria used for loading and the type of load that is performed. Loading operations can be either "lightweight" or "heavyweight". Lightweight loads load only those values directly associated with a data object (the immediate properties of an object). Heavyweight loads load those values directly associated with an object as well as the values of those objects directly contained by the object. Heavyweight loads are optimized to be as efficient as possible, but because more data is loaded performance will be slower than that of lightweight loads. As a result, lightweight load should be performed whenever possible.

Because of the tree structure of discussion board messages and their replies, some load operations can also be "deep". A "deep" load, loads an entire tree of messages, while a "non-deep" load, loads only those messages at a specific level within the tree structure.

Since:
Bb 5.5

Nested Class Summary
static class MessageDbLoader.Default
          A utility class that provides quick access to the MessageDbLoader 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
 java.util.List<Message> collectMessagesByIds(java.lang.String ids)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByMsgIdsWithStatus(List, Id, boolean, boolean, boolean) instead.
 java.util.List<Message> collectMessagesByIds(java.lang.String ids, java.sql.Connection con)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByMsgIdsWithStatus(List, Id, boolean, boolean, boolean, Connection) instead.
 java.util.List<Message> collectMessagesBySearch(Id user_id, java.lang.String key_word, java.lang.String start_date, java.lang.String end_date, java.lang.String scope_level, Id scope_pk1)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesBySearchWithStatus(Id, String, Id, String, String, String, boolean, boolean, boolean, Connection)
 java.util.List<Message> collectMessagesBySearch(Id user_id, java.lang.String key_word, java.lang.String start_date, java.lang.String end_date, java.lang.String scope_level, Id scope_pk1, java.sql.Connection con)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesBySearchWithStatus(Id, String, Id, String, String, String, boolean, boolean, boolean) instead.
 java.util.List<Message> collectMessagesByThreadId(Id thread_id)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessageThreadWithStatus(Id, Id, boolean, boolean, boolean) instead.
 java.util.List<Message> collectMessagesByThreadId(Id thread_id, java.sql.Connection con)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessageThreadWithStatus(Id, Id, boolean, boolean, boolean, Connection) instead.
 java.util.List<Message> collectMessagesByUserIdAndForumId(Id user_id, Id forum_id)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByForumIdAndAuthorIdWithStatus(Id, Id, Id, boolean, boolean, boolean) instead.
 java.util.List<Message> collectMessagesByUserIdAndForumId(Id user_id, Id forum_id, java.sql.Connection con)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByForumIdAndAuthorIdWithStatus(Id, Id, Id, boolean, boolean, boolean, Connection) instead.
 java.util.List<Message> collectMessagesByUserIdAndThreadId(Id user_id, Id thread_id)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByThreadIdAndAuthorIdWithStatus(Id, Id, Id, boolean, boolean, boolean) instead.
 java.util.List<Message> collectMessagesByUserIdAndThreadId(Id user_id, Id thread_id, java.sql.Connection con)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByThreadIdAndAuthorIdWithStatus(Id, Id, Id, boolean, boolean, boolean) instead.
 Id[] findPreviousAndNextThreadIdsInForum(Id forumId, Id threadId, Id userId)
          Given the id of a thread in a forum, loads the previous and next thread ids for threads in the same forum.
 Id[] findPreviousAndNextThreadIdsInForum(Id forumId, Id threadId, Id userId, java.sql.Connection con)
          Given the id of a thread in a forum, loads the previous and next thread ids for threads in the same forum.
 BbList<Message> loadAllByForumId(Id forumId)
          Loads the list of top level Messages with the given parent forum Id from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList<Message> loadAllByForumId(Id forumId, java.sql.Connection con)
          Loads the list of all Messages with the given parent forum Id from the database in a lightweight fashion using the supplied connection.
 BbList<Message> loadByForumId(Id forumId)
          Loads the list of all Messages with the given parent forum Id from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList<Message> loadByForumId(Id forumId, java.sql.Connection con)
          Loads the list of top level Messages with the given parent forum Id from the database in a lightweight fashion using the supplied connection.
 BbList<Message> loadByForumId(Id forumId, java.sql.Connection con, boolean bDeep, boolean bHeavy)
          Loads a list of Messages with the given parent forum Id from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 java.util.List<Message> loadByForumIdAndGradeColumnDeletedStatus(Id forumId, boolean deleted)
          Load the list of threads/messages under a specified forum which have associated GradableItem with specified deleted flag.
 BbList<Message> loadByForumIdAndLifeCycle(Id forumId, Message.MessageLifecycle ml)
          Loads the list of top level Messages with the given parent forum Id and the message's lifecycle from the database in a lightweight fashion using a connection obtained through this object's database context.
 BbList<Message> loadByForumIdAndLifeCycle(Id forumId, Message.MessageLifecycle ml, java.sql.Connection con)
          Loads the list of top level Messages with the given parent forum Id and the message's lifecycle from the database in a lightweight fashion using a supplied connection .
 Message loadByForumIdAndLinkRefId(Id forumId, java.lang.String linkRefId)
          Load the thread/message with the specified forum id and link ref id.
 Message loadById(Id id)
          Load the Message with the given Id from the database in a lightweight fashion using a connection obtained through this object's database context.
 Message loadById(Id id, java.sql.Connection con)
          Load the Message with the given Id from the database in a lightweight fashion using the supplied connection.
 Message loadById(Id id, java.sql.Connection con, boolean bHeavy)
          Load the Message with the given Id from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 Message loadById(Id id, java.sql.Connection con, boolean bHeavy, boolean bDeep)
          Load the Message with the given Id from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 java.util.List<Message> loadByMessageIdsAndGradeColumnDeletedStatus(Id courseId, Id[] messageIds, boolean deleted)
          Loads the list of threads/messages which have active GradableItem associated.
 java.util.List<Message> loadImmediateChildrenByMessageId(Id parentId)
          Loads a list of all immediate child messages of the given parent message WITHOUT MessageStatus objects or other heavy objects.
 java.util.List<Message> loadImmediateChildrenByMessageId(Id parentId, java.sql.Connection con)
          Loads a list of all immediate child messages of the given parent message WITHOUT MessageStatus objects or other heavy objects, using the supplied connection.
 java.util.List<Message> loadImmediateChildrenWithStatusAndCountsByMessageId(Id messageId, Id forumId, Id userId)
          Loads the immediate childen of the specified message using a connection obtained through this object's database context
 java.util.List<Message> loadImmediateChildrenWithStatusAndCountsByMessageId(Id messageId, Id forumId, Id userId, java.sql.Connection con)
          Loads the immediate childen of the specified message using the specified database connection
 MessageCounts loadMessageCountsByConferenceId(Id conferenceId, Id userId)
          Loads the count of total / read messages in a conference using a connection obtained through this object's database context
 MessageCounts loadMessageCountsByConferenceId(Id conferenceId, Id userId, java.sql.Connection con)
          Loads the count of total / read messages in a conference using the specified database connection
 MessageCounts loadMessageCountsByForumId(Id forumId, Id userId)
          Loads the count of total / read messages in a forum using a connection obtained through this object's database context
 MessageCounts loadMessageCountsByForumId(Id forumId, Id userId, java.sql.Connection con)
          Loads the count of total / read messages in a forum using the specified database connection
 MessageCounts loadMessageCountsByMsgIds(java.util.List<Id> msgIds, Id userId)
          Loads the count of total / read messages in the specified messages using a connection obtained through this object's database context.
 MessageCounts loadMessageCountsByMsgIds(java.util.List<Id> msgIds, Id userId, java.sql.Connection con)
          Loads the count of total / read messages in the specified messages using the specified database connection
 MessageCounts loadMessageCountsByMsgIds(java.lang.String msgIds, Id userId)
          Deprecated. Since 9.1. Use loadMessageCountsByMsgIds(List, Id) instead.
 MessageCounts loadMessageCountsByMsgIds(java.lang.String msgIds, Id userId, java.sql.Connection con)
          Deprecated. Since 9.1. Use loadMessageCountsByMsgIds(List, Id, Connection) instead.
 MessageCounts loadMessageCountsByThreadId(Id threadId, Id userId)
          Loads the count of total / read messages in a thread using a connection obtained through this object's database context Does *NOT* include the top-level message itself in the counts
 MessageCounts loadMessageCountsByThreadId(Id threadId, Id userId, java.sql.Connection con)
          Loads the count of total / read messages in a thread using the specified database connection Does *NOT* include the top-level message itself in the counts
 java.util.List<Message> loadMessagesByForumIdAndAuthorIdWithStatus(Id forumId, Id userId, Id authorId, boolean heavyAttachment, boolean includeTopic, boolean loadTags)
          Loads a list of messages (PUBLISHED only) in the given forum authored by the specified user using a connection obtained through this object's database context The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.
 java.util.List<Message> loadMessagesByForumIdAndAuthorIdWithStatus(Id forumId, Id userId, Id authorId, boolean heavyAttachment, boolean includeTopic, boolean loadTags, java.sql.Connection con)
          Loads a list of messages (PUBLISHED only) in the given forum authored by the specified user using the specified database connection The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.
 java.util.List<Message> loadMessagesByForumIdAndTagIdWithStatus(Id forumId, Id userId, Id tagId, boolean heavyAttachment, boolean includeTopic, boolean loadTags)
          Loads a list of messages in the given forum having the specified tag using the specified database connection The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.
 java.util.List<Message> loadMessagesByForumIdAndTagIdWithStatus(Id forumId, Id userId, Id tagId, boolean heavyAttachment, boolean includeTopic, boolean loadTags, java.sql.Connection con)
          Loads a list of messages in the given forum having the specified tag using a connection obtained through this object's database context.
 java.util.List<Message> loadMessagesByForumIdWithStatus(Id forumId, Id userId, boolean unreadOnly, boolean heavyAttachment, boolean includeTopic, boolean loadTags)
          Loads a list of messages in the given forum using a connection obtained through this object's database context The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.
 java.util.List<Message> loadMessagesByForumIdWithStatus(Id forumId, Id userId, boolean unreadOnly, boolean heavyAttachment, boolean includeTopic, boolean loadTags, java.sql.Connection con)
          Loads a list of messages in the given forum using the specified database connection The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.
 java.util.List<Message> loadMessagesByMsgIdsWithStatus(java.util.List<Id> msgIds, Id userId, boolean heavyAttachment, boolean includeTopic, boolean loadTags)
          Loads the specified messages with status information using the specified database connection.
 java.util.List<Message> loadMessagesByMsgIdsWithStatus(java.util.List<Id> msgIds, Id userId, boolean heavyAttachment, boolean includeTopic, boolean loadTags, java.sql.Connection con)
          Loads the specified messages with status information using a connection obtained through this object's database context.
 java.util.List<Message> loadMessagesBySearchWithStatus(Id userId, java.lang.String scopeType, Id scopeId, java.lang.String keyword, java.lang.String startDate, java.lang.String endDate, boolean heavyAttachment, boolean includeTopic, boolean loadTags)
          Returns the result of searching messages by keyword, in a date range, and in a specific scope using a connection obtained through this object's database context.
 java.util.List<Message> loadMessagesBySearchWithStatus(Id userId, java.lang.String scopeType, Id scopeId, java.lang.String keyword, java.lang.String startDate, java.lang.String endDate, boolean heavyAttachment, boolean includeTopic, boolean loadTags, java.sql.Connection con)
          Returns the result of searching messages by keyword, in a date range, and in a specific scope using the specified connection.
 java.util.List<Message> loadMessagesByThreadIdAndAuthorIdWithStatus(Id topMsgId, Id userId, Id authorId, boolean heavyAttachment, boolean includeTopic, boolean loadTags)
          Loads a list of messages (PUBLISHED only) in the given thread authored by the specified user using a connection obtained through this object's database context.
 java.util.List<Message> loadMessagesByThreadIdAndAuthorIdWithStatus(Id topMsgId, Id userId, Id authorId, boolean heavyAttachment, boolean includeTopic, boolean loadTags, java.sql.Connection con)
          Loads a list of messages (PUBLISHED only) in the given thread authored by the specified user using the specified database connection.
 java.util.List<Message> loadMessagesByThreadIdsWithStatus(java.util.List<Id> threadIds, Id forumId, Id userId, boolean heavyAttachment, boolean includeTopic, boolean loadTags)
          Loads a list of messsages in the specified threads using a connection obtained through this object's database context.
 java.util.List<Message> loadMessagesByThreadIdsWithStatus(java.util.List<Id> threadIds, Id forumId, Id userId, boolean heavyAttachment, boolean includeTopic, boolean loadTags, java.sql.Connection con)
          Loads a list of messsages in the specified threads using the specified database connection.
 java.util.List<Message> loadMessagesByThreadIdWithStatus(Id topMsgId, Id userId, boolean unreadOnly, boolean heavyAttachment, boolean includeTopic, boolean loadTags)
          Loads a list of messages in the given thread using a connection obtained through this object's database context.
 java.util.List<Message> loadMessagesByThreadIdWithStatus(Id topMsgId, Id userId, boolean unreadOnly, boolean heavyAttachment, boolean includeTopic, boolean loadTags, java.sql.Connection con)
          Loads a list of messages in the given thread using the specified database connection.
 java.util.List<Message> loadMessagesWithStatusAndCountsByForumId(Id forumId, Id userId)
          Loads all the messages in a forum using a connection obtained through this object's database context
 java.util.List<Message> loadMessagesWithStatusAndCountsByForumId(Id forumId, Id userId, java.sql.Connection con)
          Loads all the messages in a forum using the specified database connection
 java.util.List<Message> loadMessageThreadWithStatus(Id msgId, Id userId, boolean heavyAttachment, boolean loadBody, boolean includeTopic)
          Loads the messages in the specified thread using a connection obtained through this object's database context
 java.util.List<Message> loadMessageThreadWithStatus(Id msgId, Id userId, boolean heavyAttachment, boolean loadBody, boolean includeTopic, java.sql.Connection con)
          Loads the messages in the specified thread using the specified database connection
 java.util.List<Message> loadMessageThreadWithStatusAndTags(Id msgId, Id userId, boolean heavyAttachment, boolean loadBody, boolean includeTopic)
          Loads the messages and accompanying Tags in the specified thread using a connection obtained through this object's database context
 blackboard.persist.DataList<Message> loadMessageTreeByForumId(Id forumId, java.sql.Connection con)
          This function is for Course Archive
 Message loadThreadByLinkRefId(Id courseId, java.lang.String linkRefId)
          Load the top thread with the given linkRefId from the database in a lightweight fashion using a connection obtained through this object's database context.
 Message loadThreadByLinkRefId(java.lang.String linkRefId)
          Deprecated. Since 9.1SP4 this method is not safe to use since linkrefid are not guaranteed to be unique system-wide. They should be used with the courseId.
 java.util.List<?> loadThreadWithStatus(Id forumId, Id userId)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadTopThreadsWithStatusAndCountsByForumId(Id, Id, boolean, boolean, boolean) instead.
 java.util.List<?> loadThreadWithStatus(Id forumId, Id userId, java.sql.Connection con)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadTopThreadsWithStatusAndCountsByForumId(Id, Id, boolean, boolean, boolean, Connection) instead.
 Message loadTopThreadById(Id id)
          Load the top thread with the given Id from the database in a lightweight fashion using a connection obtained through this object's database context.
 Message loadTopThreadById(Id id, java.sql.Connection con)
          Load the top thread with the given Id from the database in a lightweight fashion using the supplied connection.
 blackboard.persist.DataList<Message> loadTopThreadsByForumId(Id forumId, java.sql.Connection con)
          This function is for Course Export
 java.util.List<Message> loadTopThreadsWithStatusAndCountsByForumId(Id forumId, Id userId, boolean loadAttachments, boolean loadTags, boolean flagRollup)
          Loads the top threads in a forum using a connection obtained through this object's database context
 java.util.List<Message> loadTopThreadsWithStatusAndCountsByForumId(Id forumId, Id userId, boolean loadAttachment, boolean loadTags, boolean flagRollup, java.sql.Connection con)
          Loads the top threads in a forum using the specified database connection
 java.util.List<Message> loadTreeWithStatus(Id messageId, Id userId)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessageThreadWithStatus(Id, Id, boolean, boolean, boolean) using a thread id instead.
 java.util.List<Message> loadTreeWithStatus(Id messageId, Id userId, java.sql.Connection con)
          Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessageThreadWithStatus(Id, Id, boolean, boolean, boolean, Connection) using a thread id instead.
 Message loadWithStatusByIdAndUserId(Id messageId, Id userId)
          load messageId and userId from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.
 Message loadWithStatusByIdAndUserId(Id messageId, Id userId, java.sql.Connection con)
          load messageId and userId from the database in the specified fashion (lightweight or heavyweight) using a connection obtained through this object's database context.
 
Methods inherited from interface blackboard.persist.Loader
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.getLoader(String)

See Also:
Constant Field Values
Method Detail

loadById

Message loadById(Id id)
                 throws KeyNotFoundException,
                        PersistenceException
Load the Message with the given Id from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
id - the Id of the Message that should be loaded
Throws:
KeyNotFoundException - if there is no Message in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadById

Message loadById(Id id,
                 java.sql.Connection con)
                 throws KeyNotFoundException,
                        PersistenceException
Load the Message with the given Id from the database in a lightweight fashion using the supplied connection.

Parameters:
id - the Id of the Message that should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if there is no Message in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadById

Message loadById(Id id,
                 java.sql.Connection con,
                 boolean bHeavy)
                 throws KeyNotFoundException,
                        PersistenceException
Load the Message with the given Id from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

Parameters:
id - the Id of the Message that should be loaded
con - the Connection to use to perform the load. Can be null.
bHeavy - a boolean value denoting whether a "heavy" load should be performed.
Throws:
KeyNotFoundException - if there is no Message in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadById

Message loadById(Id id,
                 java.sql.Connection con,
                 boolean bHeavy,
                 boolean bDeep)
                 throws KeyNotFoundException,
                        PersistenceException
Load the Message with the given Id from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

Parameters:
id - the Id of the Message that should be loaded
con - the Connection to use to perform the load. Can be null.
bHeavy - a boolean value denoting whether a "heavy" load should be performed.
bDeep - a boolean value denoting whether all the responsed should be loaded.
Throws:
KeyNotFoundException - if there is no Message in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadTopThreadById

Message loadTopThreadById(Id id)
                          throws KeyNotFoundException,
                                 PersistenceException
Load the top thread with the given Id from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
id - the Id of the Message that should be loaded
Throws:
KeyNotFoundException - if there is no Message in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadThreadByLinkRefId

@Deprecated
Message loadThreadByLinkRefId(java.lang.String linkRefId)
                              throws PersistenceException
Deprecated. Since 9.1SP4 this method is not safe to use since linkrefid are not guaranteed to be unique system-wide. They should be used with the courseId.

Load the top thread with the given linkRefId from the database in a lightweight fashion using a connection obtained through this object's database context. Note that it will try to use the current context courseId if any to narrow the query.

Parameters:
linkRefId - the linkrefId of the Message that should be loaded
Throws:
KeyNotFoundException - if there is no Message in the database with the given id
PersistenceException - if some other error occurs while loading the object
See Also:
loadThreadByLinkRefId(Id, String)

loadThreadByLinkRefId

Message loadThreadByLinkRefId(Id courseId,
                              java.lang.String linkRefId)
                              throws PersistenceException
Load the top thread with the given linkRefId from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
linkRefId - the linkrefId of the Message that should be loaded
Throws:
KeyNotFoundException - if there is no Message in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadTopThreadById

Message loadTopThreadById(Id id,
                          java.sql.Connection con)
                          throws KeyNotFoundException,
                                 PersistenceException
Load the top thread with the given Id from the database in a lightweight fashion using the supplied connection.

Parameters:
id - the Id of the Message that should be loaded
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - if there is no Message in the database with the given id
PersistenceException - if some other error occurs while loading the object

loadAllByForumId

BbList<Message> loadAllByForumId(Id forumId)
                                 throws KeyNotFoundException,
                                        PersistenceException
Loads the list of top level Messages with the given parent forum Id from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
forumId - the Id of the Forum that top level messages should be loaded for
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadAllByForumId

BbList<Message> loadAllByForumId(Id forumId,
                                 java.sql.Connection con)
                                 throws KeyNotFoundException,
                                        PersistenceException
Loads the list of all Messages with the given parent forum Id from the database in a lightweight fashion using the supplied connection.

Parameters:
forumId - the Id of the Forum that top level messages should be loaded for
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadByForumId

BbList<Message> loadByForumId(Id forumId)
                              throws KeyNotFoundException,
                                     PersistenceException
Loads the list of all Messages with the given parent forum Id from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
forumId - the Id of the Forum that top level messages should be loaded for
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadByForumId

BbList<Message> loadByForumId(Id forumId,
                              java.sql.Connection con)
                              throws KeyNotFoundException,
                                     PersistenceException
Loads the list of top level Messages with the given parent forum Id from the database in a lightweight fashion using the supplied connection.

Parameters:
forumId - the Id of the Forum that top level messages should be loaded for
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadByForumIdAndLifeCycle

BbList<Message> loadByForumIdAndLifeCycle(Id forumId,
                                          Message.MessageLifecycle ml)
                                          throws KeyNotFoundException,
                                                 PersistenceException
Loads the list of top level Messages with the given parent forum Id and the message's lifecycle from the database in a lightweight fashion using a connection obtained through this object's database context.

Parameters:
forumId - the Id of the Forum that top level messages should be loaded for
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadByForumIdAndLifeCycle

BbList<Message> loadByForumIdAndLifeCycle(Id forumId,
                                          Message.MessageLifecycle ml,
                                          java.sql.Connection con)
                                          throws KeyNotFoundException,
                                                 PersistenceException
Loads the list of top level Messages with the given parent forum Id and the message's lifecycle from the database in a lightweight fashion using a supplied connection .

Parameters:
forumId - the Id of the Forum that top level messages should be loaded for
con - the Connection to use to perform the load. Can be null.
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadByForumId

BbList<Message> loadByForumId(Id forumId,
                              java.sql.Connection con,
                              boolean bDeep,
                              boolean bHeavy)
                              throws KeyNotFoundException,
                                     PersistenceException
Loads a list of Messages with the given parent forum Id from the database in the specified fashion (lightweight or heavyweight) using the supplied connection.

If a deep load is requested, all messages belonging to the specified forum will be loaded as a tree such that the returned list is the set of top level messages (beginning message of a thread) and all oher messages appear as children/responses to these messages. If the requested load is not deep, only the top level messages for the forum will be loaded

Parameters:
forumId - the Id of the Forum that messages should be loaded for
con - the Connection to use to perform the load. Can be null.
bDeep - a boolean value denoting whether a "deep" load should be performed.
bHeavy - a boolean value denoting whether a "heavy" load should be performed.
Throws:
KeyNotFoundException - not thrown
PersistenceException - if some other error occurs while loading the object

loadTreeWithStatus

@Deprecated
java.util.List<Message> loadTreeWithStatus(Id messageId,
                                                      Id userId)
                                           throws PersistenceException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessageThreadWithStatus(Id, Id, boolean, boolean, boolean) using a thread id instead.

Given a message, get the thread that it belongs to and every message under that thread with message statuses loaded with respect to the given user. * load messageId and userId from the database in the specified fashion (lightweight or heavyweight) using a connection obtained through this object's database context. Status include: 1. Ancestor distance 2. Parent position 3. has attachment ind if user_id is provide 4. read count 5. is flagged

Throws:
PersistenceException - if some other error occurs while loading the object

loadTreeWithStatus

@Deprecated
java.util.List<Message> loadTreeWithStatus(Id messageId,
                                                      Id userId,
                                                      java.sql.Connection con)
                                           throws PersistenceException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessageThreadWithStatus(Id, Id, boolean, boolean, boolean, Connection) using a thread id instead.

Given a message, get the thread that it belongs to and every message under that thread with message statuses loaded with respect to the given user. load messageId and userId from the database in the specified fashion (lightweight or heavyweight) using the supplied connection. Status include: 1. Ancestor distance 2. Parent position 3. has attachment ind if user_id is provide 4. read count 5. is flagged

Throws:
PersistenceException - if some other error occurs while loading the object

loadWithStatusByIdAndUserId

Message loadWithStatusByIdAndUserId(Id messageId,
                                    Id userId)
                                    throws PersistenceException
load messageId and userId from the database in the specified fashion (lightweight or heavyweight) using the supplied connection. Status include: 1. numbers of children count ( include/exclude DRAFT) 2. Ancestor id 3. has attachment ind if user_id is provide 4. read count 5. is flagged

Throws:
PersistenceException - if some other error occurs while loading the object

loadWithStatusByIdAndUserId

Message loadWithStatusByIdAndUserId(Id messageId,
                                    Id userId,
                                    java.sql.Connection con)
                                    throws PersistenceException
load messageId and userId from the database in the specified fashion (lightweight or heavyweight) using a connection obtained through this object's database context. Status include: 1. numbers of children count ( include/exclude DRAFT) 2. Ancestor id 3. has attachment ind if user_id is provide 4. read count 5. is flagged

Throws:
PersistenceException - if some other error occurs while loading the object

collectMessagesByIds

@Deprecated
java.util.List<Message> collectMessagesByIds(java.lang.String ids)
                                             throws PersistenceException,
                                                    KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByMsgIdsWithStatus(List, Id, boolean, boolean, boolean) instead.

Collects messages by the supplied messages's id from the database in the specified fashion (lightweight or heavyweight) using a connection obtained through this object's database context.

Throws:
KeyNotFoundException - if the provided messages's ids is invalid
PersistenceException - if some other error occurs while loading the object

collectMessagesByIds

@Deprecated
java.util.List<Message> collectMessagesByIds(java.lang.String ids,
                                                        java.sql.Connection con)
                                             throws PersistenceException,
                                                    KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByMsgIdsWithStatus(List, Id, boolean, boolean, boolean, Connection) instead.

Collects messages by the supplied messages's id from the database in the specified fashion (lightweight or heavyweight) using a supplied connection.

Throws:
KeyNotFoundException - if the provided messages's ids is invalid
PersistenceException - if some other error occurs while loading the object

collectMessagesByUserIdAndForumId

@Deprecated
java.util.List<Message> collectMessagesByUserIdAndForumId(Id user_id,
                                                                     Id forum_id)
                                                          throws PersistenceException,
                                                                 KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByForumIdAndAuthorIdWithStatus(Id, Id, Id, boolean, boolean, boolean) instead.

Collects messages by the supplied user_id and forum_id from the database in the specified fashion (lightweight or heavyweight) using a connection obtained through this object's database context.

Throws:
KeyNotFoundException - if the provided user_id or forum_id is invalid
PersistenceException - if some other error occurs while loading the object

collectMessagesByUserIdAndForumId

@Deprecated
java.util.List<Message> collectMessagesByUserIdAndForumId(Id user_id,
                                                                     Id forum_id,
                                                                     java.sql.Connection con)
                                                          throws PersistenceException,
                                                                 KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByForumIdAndAuthorIdWithStatus(Id, Id, Id, boolean, boolean, boolean, Connection) instead.

Collects messages by the supplied user_id and forum_id from the database in the specified fashion (lightweight or heavyweight) using a supplied connection.

Throws:
KeyNotFoundException - if the provided user_id or forum_id is invalid
PersistenceException - if some other error occurs while loading the object

collectMessagesByUserIdAndThreadId

@Deprecated
java.util.List<Message> collectMessagesByUserIdAndThreadId(Id user_id,
                                                                      Id thread_id)
                                                           throws PersistenceException,
                                                                  KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByThreadIdAndAuthorIdWithStatus(Id, Id, Id, boolean, boolean, boolean) instead.

Collects messages by the supplied user_id and thread_id from the database in the specified fashion (lightweight or heavyweight) using a connection obtained through this object's database context.

Throws:
KeyNotFoundException - if the provided user_id or thread_id is invalid
PersistenceException - if some other error occurs while loading the object

collectMessagesByUserIdAndThreadId

@Deprecated
java.util.List<Message> collectMessagesByUserIdAndThreadId(Id user_id,
                                                                      Id thread_id,
                                                                      java.sql.Connection con)
                                                           throws PersistenceException,
                                                                  KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesByThreadIdAndAuthorIdWithStatus(Id, Id, Id, boolean, boolean, boolean) instead.

Collects messages by the supplied user_id and thread_id from the database in the specified fashion (lightweight or heavyweight) using a supplied connection .

Throws:
KeyNotFoundException - if the provided user_id or thread_id is invalid
PersistenceException - if some other error occurs while loading the object

collectMessagesByThreadId

@Deprecated
java.util.List<Message> collectMessagesByThreadId(Id thread_id)
                                                  throws PersistenceException,
                                                         KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessageThreadWithStatus(Id, Id, boolean, boolean, boolean) instead.

Collects messages by the supplied thread_id from the database in the specified fashion (lightweight or heavyweight) using a connection obtained through this object's database context.

Throws:
KeyNotFoundException - if the provided thread_id is invalid
PersistenceException - if some other error occurs while loading the object

collectMessagesByThreadId

@Deprecated
java.util.List<Message> collectMessagesByThreadId(Id thread_id,
                                                             java.sql.Connection con)
                                                  throws PersistenceException,
                                                         KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessageThreadWithStatus(Id, Id, boolean, boolean, boolean, Connection) instead.

Collects messages by the supplied thread_id from the database in the specified fashion (lightweight or heavyweight) using a supplied connection.

Throws:
KeyNotFoundException - if the provided thread_id is invalid
PersistenceException - if some other error occurs while loading the object

loadThreadWithStatus

@Deprecated
java.util.List<?> loadThreadWithStatus(Id forumId,
                                                  Id userId)
                                       throws PersistenceException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadTopThreadsWithStatusAndCountsByForumId(Id, Id, boolean, boolean, boolean) instead.

This is a light weight loader, only the following attributes of the top threads in a forum are returned MessageDef.ID, MessageDef.FORUM_ID, MessageDef.LIFECYCLE, MessageDef.SUBJECT, MessageDef.IS_THREAD_LOCKED And in the nested MessageStatus. MessageStatus.MessageStatusDef.TOTAL_COUNT, MessageStatus.MessageStatusDef.READ_COUNT

Throws:
PersistenceException

loadThreadWithStatus

@Deprecated
java.util.List<?> loadThreadWithStatus(Id forumId,
                                                  Id userId,
                                                  java.sql.Connection con)
                                       throws PersistenceException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadTopThreadsWithStatusAndCountsByForumId(Id, Id, boolean, boolean, boolean, Connection) instead.

This is a light weight loader, only the following attributes of the top threads in a forum are returned MessageDef.ID, MessageDef.FORUM_ID, MessageDef.LIFECYCLE, MessageDef.SUBJECT, MessageDef.IS_THREAD_LOCKED And in the nested MessageStatus. MessageStatus.MessageStatusDef.TOTAL_COUNT, MessageStatus.MessageStatusDef.READ_COUNT MessageStatusDef.TOTAL_VIEWS

Throws:
PersistenceException

collectMessagesBySearch

@Deprecated
java.util.List<Message> collectMessagesBySearch(Id user_id,
                                                           java.lang.String key_word,
                                                           java.lang.String start_date,
                                                           java.lang.String end_date,
                                                           java.lang.String scope_level,
                                                           Id scope_pk1)
                                                throws PersistenceException,
                                                       KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesBySearchWithStatus(Id, String, Id, String, String, String, boolean, boolean, boolean, Connection)

Collects messages by the supplied search condition from the database in the specified fashion (lightweight or heavyweight) using a connection obtained through this object's database context. At the same time, Sorts these message by their subject.

Throws:
KeyNotFoundException - if the provided parameters is invalid
PersistenceException - if some other error occurs while loading the object

collectMessagesBySearch

@Deprecated
java.util.List<Message> collectMessagesBySearch(Id user_id,
                                                           java.lang.String key_word,
                                                           java.lang.String start_date,
                                                           java.lang.String end_date,
                                                           java.lang.String scope_level,
                                                           Id scope_pk1,
                                                           java.sql.Connection con)
                                                throws PersistenceException,
                                                       KeyNotFoundException
Deprecated. Since 7.3. This loader does not load message status objects with the messages. Use loadMessagesBySearchWithStatus(Id, String, Id, String, String, String, boolean, boolean, boolean) instead.

Collects messages by the suppiled search condition from the database in the specified fashion (lightweight or heavyweight) using a supplied connection.

Throws:
PersistenceException
KeyNotFoundException

loadImmediateChildrenByMessageId

java.util.List<Message> loadImmediateChildrenByMessageId(Id parentId)
                                                         throws PersistenceException,
                                                                KeyNotFoundException
Loads a list of all immediate child messages of the given parent message WITHOUT MessageStatus objects or other heavy objects.

Returns:
a list of messages
Throws:
PersistenceException - if the provided messages's ids is invalid
KeyNotFoundException - not thrown

loadImmediateChildrenByMessageId

java.util.List<Message> loadImmediateChildrenByMessageId(Id parentId,
                                                         java.sql.Connection con)
                                                         throws PersistenceException,
                                                                KeyNotFoundException
Loads a list of all immediate child messages of the given parent message WITHOUT MessageStatus objects or other heavy objects, using the supplied connection.

Returns:
a list of messages
Throws:
PersistenceException - if the provided messages's ids is invalid
KeyNotFoundException - not thrown

loadMessagesByForumIdWithStatus

java.util.List<Message> loadMessagesByForumIdWithStatus(Id forumId,
                                                        Id userId,
                                                        boolean unreadOnly,
                                                        boolean heavyAttachment,
                                                        boolean includeTopic,
                                                        boolean loadTags,
                                                        java.sql.Connection con)
                                                        throws PersistenceException
Loads a list of messages in the given forum using the specified database connection The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
forumId - id of the forum
unreadOnly - whether to return only unread messages. If false will return all messages
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByForumIdWithStatus

java.util.List<Message> loadMessagesByForumIdWithStatus(Id forumId,
                                                        Id userId,
                                                        boolean unreadOnly,
                                                        boolean heavyAttachment,
                                                        boolean includeTopic,
                                                        boolean loadTags)
                                                        throws PersistenceException
Loads a list of messages in the given forum using a connection obtained through this object's database context The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
forumId - id of the forum
unreadOnly - whether to return only unread messages. If false will return all messages
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByForumIdAndAuthorIdWithStatus

java.util.List<Message> loadMessagesByForumIdAndAuthorIdWithStatus(Id forumId,
                                                                   Id userId,
                                                                   Id authorId,
                                                                   boolean heavyAttachment,
                                                                   boolean includeTopic,
                                                                   boolean loadTags,
                                                                   java.sql.Connection con)
                                                                   throws PersistenceException
Loads a list of messages (PUBLISHED only) in the given forum authored by the specified user using the specified database connection The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
forumId - id of the forum
userId - the Id of the current user
authorId - the Id of the author to filter by
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByForumIdAndAuthorIdWithStatus

java.util.List<Message> loadMessagesByForumIdAndAuthorIdWithStatus(Id forumId,
                                                                   Id userId,
                                                                   Id authorId,
                                                                   boolean heavyAttachment,
                                                                   boolean includeTopic,
                                                                   boolean loadTags)
                                                                   throws PersistenceException
Loads a list of messages (PUBLISHED only) in the given forum authored by the specified user using a connection obtained through this object's database context The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
forumId - id of the forum
userId - the Id of the current user
authorId - the Id of the author to filter by
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByForumIdAndTagIdWithStatus

java.util.List<Message> loadMessagesByForumIdAndTagIdWithStatus(Id forumId,
                                                                Id userId,
                                                                Id tagId,
                                                                boolean heavyAttachment,
                                                                boolean includeTopic,
                                                                boolean loadTags,
                                                                java.sql.Connection con)
                                                                throws PersistenceException
Loads a list of messages in the given forum having the specified tag using a connection obtained through this object's database context. The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
forumId - id of the forum
userId - the Id of the current user
tagId - the Id of the tag to filter by
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByForumIdAndTagIdWithStatus

java.util.List<Message> loadMessagesByForumIdAndTagIdWithStatus(Id forumId,
                                                                Id userId,
                                                                Id tagId,
                                                                boolean heavyAttachment,
                                                                boolean includeTopic,
                                                                boolean loadTags)
                                                                throws PersistenceException
Loads a list of messages in the given forum having the specified tag using the specified database connection The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
forumId - id of the forum
userId - the Id of the current user
tagId - the Id of the tag to filter by
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByThreadIdWithStatus

java.util.List<Message> loadMessagesByThreadIdWithStatus(Id topMsgId,
                                                         Id userId,
                                                         boolean unreadOnly,
                                                         boolean heavyAttachment,
                                                         boolean includeTopic,
                                                         boolean loadTags,
                                                         java.sql.Connection con)
                                                         throws PersistenceException
Loads a list of messages in the given thread using the specified database connection. Includes the top-level message in the results. The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
topMsgId - id of the top level message in a thread
unreadOnly - whether to return only unread messages. If false will return all messages
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByThreadIdWithStatus

java.util.List<Message> loadMessagesByThreadIdWithStatus(Id topMsgId,
                                                         Id userId,
                                                         boolean unreadOnly,
                                                         boolean heavyAttachment,
                                                         boolean includeTopic,
                                                         boolean loadTags)
                                                         throws PersistenceException
Loads a list of messages in the given thread using a connection obtained through this object's database context. Includes the top-level message in the results. The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
topMsgId - id of the top level message in a thread
unreadOnly - whether to return only unread messages. If false will return all messages
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByThreadIdsWithStatus

java.util.List<Message> loadMessagesByThreadIdsWithStatus(java.util.List<Id> threadIds,
                                                          Id forumId,
                                                          Id userId,
                                                          boolean heavyAttachment,
                                                          boolean includeTopic,
                                                          boolean loadTags,
                                                          java.sql.Connection con)
                                                          throws PersistenceException
Loads a list of messsages in the specified threads using the specified database connection. The returned messages are "heavy" in that they have the message body in them

Parameters:
threadIds - list of ids of the threads to load
forumId - id of forum that the threads are in
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
loadTags - whether to load any associated Tags
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByThreadIdsWithStatus

java.util.List<Message> loadMessagesByThreadIdsWithStatus(java.util.List<Id> threadIds,
                                                          Id forumId,
                                                          Id userId,
                                                          boolean heavyAttachment,
                                                          boolean includeTopic,
                                                          boolean loadTags)
                                                          throws PersistenceException
Loads a list of messsages in the specified threads using a connection obtained through this object's database context. The returned messages are "heavy" in that they have the message body in them

Parameters:
threadIds - list of ids of the threads to load
forumId - id of forum that the threads are in
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
loadTags - whether to load any associated Tags
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByThreadIdAndAuthorIdWithStatus

java.util.List<Message> loadMessagesByThreadIdAndAuthorIdWithStatus(Id topMsgId,
                                                                    Id userId,
                                                                    Id authorId,
                                                                    boolean heavyAttachment,
                                                                    boolean includeTopic,
                                                                    boolean loadTags,
                                                                    java.sql.Connection con)
                                                                    throws PersistenceException
Loads a list of messages (PUBLISHED only) in the given thread authored by the specified user using the specified database connection. Includes the top-level message in the results. The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
topMsgId - id of the top level message in a thread
userId - the Id of the current user
authorId - the Id of the author to filter by
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByThreadIdAndAuthorIdWithStatus

java.util.List<Message> loadMessagesByThreadIdAndAuthorIdWithStatus(Id topMsgId,
                                                                    Id userId,
                                                                    Id authorId,
                                                                    boolean heavyAttachment,
                                                                    boolean includeTopic,
                                                                    boolean loadTags)
                                                                    throws PersistenceException
Loads a list of messages (PUBLISHED only) in the given thread authored by the specified user using a connection obtained through this object's database context. Includes the top-level message in the results. The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
topMsgId - id of the top level message in a thread
userId - the Id of the current user
authorId - the Id of the author to filter by
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByMsgIdsWithStatus

java.util.List<Message> loadMessagesByMsgIdsWithStatus(java.util.List<Id> msgIds,
                                                       Id userId,
                                                       boolean heavyAttachment,
                                                       boolean includeTopic,
                                                       boolean loadTags,
                                                       java.sql.Connection con)
                                                       throws PersistenceException
Loads the specified messages with status information using a connection obtained through this object's database context. The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
msgIds - List of Ids of the messages that are to be loaded
userId - id of the current user
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesByMsgIdsWithStatus

java.util.List<Message> loadMessagesByMsgIdsWithStatus(java.util.List<Id> msgIds,
                                                       Id userId,
                                                       boolean heavyAttachment,
                                                       boolean includeTopic,
                                                       boolean loadTags)
                                                       throws PersistenceException
Loads the specified messages with status information using the specified database connection. The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
msgIds - List of Ids of the messages that are to be loaded
userId - id of the current user
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesBySearchWithStatus

java.util.List<Message> loadMessagesBySearchWithStatus(Id userId,
                                                       java.lang.String scopeType,
                                                       Id scopeId,
                                                       java.lang.String keyword,
                                                       java.lang.String startDate,
                                                       java.lang.String endDate,
                                                       boolean heavyAttachment,
                                                       boolean includeTopic,
                                                       boolean loadTags)
                                                       throws PersistenceException
Returns the result of searching messages by keyword, in a date range, and in a specific scope using a connection obtained through this object's database context. The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
userId - the Id of the current user
scopeType - the scope that this search is for ( either "thread", "forum", "conference", or "course"
scopeId - the Id of the object that represents the scope (i.e. the top message id, forum id, conference id, or course id)
keyword - the keyword to search by
startDate - start date to limit the search by
endDate - end date to limit the search by
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the thread topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesBySearchWithStatus

java.util.List<Message> loadMessagesBySearchWithStatus(Id userId,
                                                       java.lang.String scopeType,
                                                       Id scopeId,
                                                       java.lang.String keyword,
                                                       java.lang.String startDate,
                                                       java.lang.String endDate,
                                                       boolean heavyAttachment,
                                                       boolean includeTopic,
                                                       boolean loadTags,
                                                       java.sql.Connection con)
                                                       throws PersistenceException
Returns the result of searching messages by keyword, in a date range, and in a specific scope using the specified connection. The returned messages are "heavy" in that they have the message body in them Any Tags associated with the messages are also loaded.

Parameters:
userId - the Id of the current user
scopeType - the scope that this search is for ( either "thread", "forum", "conference", or "course"
scopeId - the Id of the object that represents the scope (i.e. the top message id, forum id, conference id, or course id)
keyword - the keyword to search by
startDate - start date to limit the search by
endDate - end date to limit the search by
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
includeTopic - whether to include the thread topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadTopThreadsWithStatusAndCountsByForumId

java.util.List<Message> loadTopThreadsWithStatusAndCountsByForumId(Id forumId,
                                                                   Id userId,
                                                                   boolean loadAttachment,
                                                                   boolean loadTags,
                                                                   boolean flagRollup,
                                                                   java.sql.Connection con)
                                                                   throws PersistenceException
Loads the top threads in a forum using the specified database connection. - includes counts of the number of children/number of read children for each top message - doesn't load the message bodies

Parameters:
forumId - id of the discussion forum
userId - needed to load the message status for a particular user
loadAttachment - if true, any attachments associated with the messages are also loaded
loadTags - if true, any Tags associated with the messages are also loaded
flagRollup - if true, the flag indicator for top threads is set to yes if any of its children is flagged
Throws:
PersistenceException
Since:
Bb 7.3

loadTopThreadsWithStatusAndCountsByForumId

java.util.List<Message> loadTopThreadsWithStatusAndCountsByForumId(Id forumId,
                                                                   Id userId,
                                                                   boolean loadAttachments,
                                                                   boolean loadTags,
                                                                   boolean flagRollup)
                                                                   throws PersistenceException
Loads the top threads in a forum using a connection obtained through this object's database context. - includes counts of the number of children/number of read children for each top message - doesn't load the message bodies

Parameters:
forumId - id of the discussion forum
userId - needed to load the message status for a particular user
loadAttachments - if true, any attachments associated with the messages are also loaded
loadTags - if true, any Tags associated with the messages are also loaded
flagRollup - if true, the flag indicator for top threads is set to yes if any of its children is flagged
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesWithStatusAndCountsByForumId

java.util.List<Message> loadMessagesWithStatusAndCountsByForumId(Id forumId,
                                                                 Id userId,
                                                                 java.sql.Connection con)
                                                                 throws PersistenceException
Loads all the messages in a forum using the specified database connection. - includes counts of the number of children/number of read children for each message - doesn't load the message bodies

Parameters:
forumId - id of the discussion forum
Throws:
PersistenceException
Since:
Bb 7.3

loadMessagesWithStatusAndCountsByForumId

java.util.List<Message> loadMessagesWithStatusAndCountsByForumId(Id forumId,
                                                                 Id userId)
                                                                 throws PersistenceException
Loads all the messages in a forum using a connection obtained through this object's database context. - includes counts of the number of children/number of read children for each message - doesn't load the message bodies

Parameters:
forumId - id of the discussion forum
Throws:
PersistenceException
Since:
Bb 7.3

loadImmediateChildrenWithStatusAndCountsByMessageId

java.util.List<Message> loadImmediateChildrenWithStatusAndCountsByMessageId(Id messageId,
                                                                            Id forumId,
                                                                            Id userId,
                                                                            java.sql.Connection con)
                                                                            throws PersistenceException
Loads the immediate childen of the specified message using the specified database connection. - includes counts of the number of children/number of read children for each message - doesn't load the message bodies

Parameters:
messageId - id of the message whose immediate children you want
forumId - id of the forum that the message is in
Throws:
PersistenceException
Since:
Bb 7.3

loadImmediateChildrenWithStatusAndCountsByMessageId

java.util.List<Message> loadImmediateChildrenWithStatusAndCountsByMessageId(Id messageId,
                                                                            Id forumId,
                                                                            Id userId)
                                                                            throws PersistenceException
Loads the immediate childen of the specified message using a connection obtained through this object's database context. - includes counts of the number of children/number of read children for each message - doesn't load the message bodies

Parameters:
messageId - id of the message whose immediate children you want
forumId - id of the forum that the message is in
Throws:
PersistenceException
Since:
Bb 7.3

loadMessageThreadWithStatus

java.util.List<Message> loadMessageThreadWithStatus(Id msgId,
                                                    Id userId,
                                                    boolean heavyAttachment,
                                                    boolean loadBody,
                                                    boolean includeTopic,
                                                    java.sql.Connection con)
                                                    throws PersistenceException
Loads the messages in the specified thread using the specified database connection. - includes "tree" status information ( ancestor distance, parent position ) No tags are loaded. Use loadMessageThreadWithStatusAndTags(Id, Id, boolean, boolean, boolean) instead.

Parameters:
msgId - Id of the top-level message in the thread
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
loadBody - whether to load the message body
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessageThreadWithStatus

java.util.List<Message> loadMessageThreadWithStatus(Id msgId,
                                                    Id userId,
                                                    boolean heavyAttachment,
                                                    boolean loadBody,
                                                    boolean includeTopic)
                                                    throws PersistenceException
Loads the messages in the specified thread using a connection obtained through this object's database context. - includes "tree" status information ( ancestor distance, parent position ) No tags are loaded. Use loadMessageThreadWithStatusAndTags( Id msgId, Id userId, boolean heavyAttachment, boolean loadBody, boolean includeTopic ) instead.

Parameters:
msgId - Id of the top-level message in the thread
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
loadBody - whether to load the message body
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessageThreadWithStatusAndTags

java.util.List<Message> loadMessageThreadWithStatusAndTags(Id msgId,
                                                           Id userId,
                                                           boolean heavyAttachment,
                                                           boolean loadBody,
                                                           boolean includeTopic)
                                                           throws PersistenceException
Loads the messages and accompanying Tags in the specified thread using a connection obtained through this object's database context. - includes "tree" status information ( ancestor distance, parent position ) Any Tags associated with the messages are also loaded.

Parameters:
msgId - Id of the top-level message in the thread
heavyAttachment - whether to heavily load the MessageAttachment (if any) associated with the message
loadBody - whether to load the message body
includeTopic - whether to include the message topic information in the message status
Throws:
PersistenceException
Since:
Bb 7.3

loadMessageCountsByConferenceId

MessageCounts loadMessageCountsByConferenceId(Id conferenceId,
                                              Id userId,
                                              java.sql.Connection con)
                                              throws PersistenceException
Loads the count of total / read messages in a conference using the specified database connection

Throws:
PersistenceException
Since:
Bb 7.3

loadMessageCountsByConferenceId

MessageCounts loadMessageCountsByConferenceId(Id conferenceId,
                                              Id userId)
                                              throws PersistenceException
Loads the count of total / read messages in a conference using a connection obtained through this object's database context

Throws:
PersistenceException
Since:
Bb 7.3

loadMessageCountsByForumId

MessageCounts loadMessageCountsByForumId(Id forumId,
                                         Id userId,
                                         java.sql.Connection con)
                                         throws PersistenceException
Loads the count of total / read messages in a forum using the specified database connection

Throws:
PersistenceException
Since:
Bb 7.3

loadMessageCountsByForumId

MessageCounts loadMessageCountsByForumId(Id forumId,
                                         Id userId)
                                         throws PersistenceException
Loads the count of total / read messages in a forum using a connection obtained through this object's database context

Throws:
PersistenceException
Since:
Bb 7.3

loadMessageCountsByThreadId

MessageCounts loadMessageCountsByThreadId(Id threadId,
                                          Id userId,
                                          java.sql.Connection con)
                                          throws PersistenceException
Loads the count of total / read messages in a thread using the specified database connection Does *NOT* include the top-level message itself in the counts

Parameters:
threadId - message id of the top level message of a thread
Throws:
PersistenceException
Since:
Bb 7.3

loadMessageCountsByThreadId

MessageCounts loadMessageCountsByThreadId(Id threadId,
                                          Id userId)
                                          throws PersistenceException
Loads the count of total / read messages in a thread using a connection obtained through this object's database context Does *NOT* include the top-level message itself in the counts

Parameters:
threadId - message id of the top level message of a thread
Throws:
PersistenceException
Since:
Bb 7.3

loadMessageCountsByMsgIds

@Deprecated
MessageCounts loadMessageCountsByMsgIds(java.lang.String msgIds,
                                                   Id userId,
                                                   java.sql.Connection con)
                                        throws PersistenceException
Deprecated. Since 9.1. Use loadMessageCountsByMsgIds(List, Id, Connection) instead.

Throws:
PersistenceException
Since:
Bb 7.3

loadMessageCountsByMsgIds

@Deprecated
MessageCounts loadMessageCountsByMsgIds(java.lang.String msgIds,
                                                   Id userId)
                                        throws PersistenceException
Deprecated. Since 9.1. Use loadMessageCountsByMsgIds(List, Id) instead.

Throws:
PersistenceException
Since:
Bb 7.3

loadMessageCountsByMsgIds

MessageCounts loadMessageCountsByMsgIds(java.util.List<Id> msgIds,
                                        Id userId,
                                        java.sql.Connection con)
                                        throws PersistenceException
Loads the count of total / read messages in the specified messages using the specified database connection

Parameters:
msgIds - List of message ids
Throws:
PersistenceException
Since:
Bb 9.0

loadMessageCountsByMsgIds

MessageCounts loadMessageCountsByMsgIds(java.util.List<Id> msgIds,
                                        Id userId)
                                        throws PersistenceException
Loads the count of total / read messages in the specified messages using a connection obtained through this object's database context.

Parameters:
msgIds - List of message ids
Throws:
PersistenceException
Since:
Bb 9.0

findPreviousAndNextThreadIdsInForum

Id[] findPreviousAndNextThreadIdsInForum(Id forumId,
                                         Id threadId,
                                         Id userId)
                                         throws PersistenceException
Given the id of a thread in a forum, loads the previous and next thread ids for threads in the same forum. If the provided threadId is the only thread in the forum, then both previous and next thread ids will be Id.UNSET_ID. If the provided threadId is the first thread in the forum, then the previous thread id will be Id.UNSET_ID and the next will be a valid value. If the provided threadId is the last thread in the forum, then the previous thread id will be valid, the next will be Id.UNSET_ID Otherwise, the previous and next thread ids should contain valid ids.

Parameters:
forumId - - Id of the forum containing the threads. Can not be null or unset
threadId - - Id of the current thread. Can not be null or unset
userId - - Id of the user issuing the request. Can not be null or unset
Returns:
Id[] - an array of Ids containing the previous thread id as the first element and next thread id as the second element. If a previous or next thread doesn't exits, Id.UNSET_ID will be used.
Throws:
PersistenceException
Since:
Bb 7.3

findPreviousAndNextThreadIdsInForum

Id[] findPreviousAndNextThreadIdsInForum(Id forumId,
                                         Id threadId,
                                         Id userId,
                                         java.sql.Connection con)
                                         throws PersistenceException
Given the id of a thread in a forum, loads the previous and next thread ids for threads in the same forum. If the provided threadId is the only thread in the forum, then both previous and next thread ids will be Id.UNSET_ID. If the provided threadId is the first thread in the forum, then the previous thread id will be Id.UNSET_ID and the next will be a valid value. If the provided threadId is the last thread in the forum, then the previous thread id will be valid, the next will be Id.UNSET_ID Otherwise, the previous and next thread ids should contain valid ids.

Parameters:
forumId - - Id of the forum containing the threads. Can not be null or unset
threadId - - Id of the current thread. Can not be null or unset
userId - - Id of the user issuing the request. Can not be null or unset
con - - java.sql.Connection. Can not be null or unset
Returns:
Id[] - an array of Ids containing the previous thread id as the first element and next thread id as the second element. If a previous or next thread doesn't exits, Id.UNSET_ID will be used.
Throws:
PersistenceException
Since:
Bb 7.3

loadByForumIdAndLinkRefId

Message loadByForumIdAndLinkRefId(Id forumId,
                                  java.lang.String linkRefId)
                                  throws PersistenceException
Load the thread/message with the specified forum id and link ref id.

Parameters:
forumId - Id of the forum containing the thread.
linkRefId - link ref id of the thread
Returns:
thread or message with the specified forum id and link ref id.
Throws:
PersistenceException

loadByForumIdAndGradeColumnDeletedStatus

java.util.List<Message> loadByForumIdAndGradeColumnDeletedStatus(Id forumId,
                                                                 boolean deleted)
                                                                 throws PersistenceException
Load the list of threads/messages under a specified forum which have associated GradableItem with specified deleted flag.

Parameters:
forumId - the id of the forum which the threads/messages are under.
deleted - the deleted flag of the GradableItem.
Returns:
the list of Message objects which satisfy the criteria.
Throws:
PersistenceException

loadByMessageIdsAndGradeColumnDeletedStatus

java.util.List<Message> loadByMessageIdsAndGradeColumnDeletedStatus(Id courseId,
                                                                    Id[] messageIds,
                                                                    boolean deleted)
                                                                    throws PersistenceException
Loads the list of threads/messages which have active GradableItem associated.

Parameters:
courseId - id of the course to which the messages belongs.
messageIds - id of messages to check whether active GradableItems are associated.
deleted - the deleted flag of the GradableItem.
Throws:
PersistenceException

loadMessageTreeByForumId

blackboard.persist.DataList<Message> loadMessageTreeByForumId(Id forumId,
                                                              java.sql.Connection con)
                                                              throws PersistenceException
This function is for Course Archive

Parameters:
forumId - the id of the forum which the threads/messages are under.
Returns:
list of Message objects which satisfy the criteria.
Throws:
PersistenceException

loadTopThreadsByForumId

blackboard.persist.DataList<Message> loadTopThreadsByForumId(Id forumId,
                                                             java.sql.Connection con)
                                                             throws PersistenceException
This function is for Course Export

Parameters:
forumId - the id of the forum which the threads/messages are under.
Returns:
list of Message objects which satisfy the criteria.
Throws:
PersistenceException


Copyright 2011 Blackboard, Inc. All Rights Reserved.