|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.database.DbPrivateMessageFolder
public class DbPrivateMessageFolder
Database implementation of the PrivateMessageFolder interface.
Field Summary |
---|
Fields inherited from interface com.jivesoftware.forum.PrivateMessageFolder |
---|
FOLDER_DRAFTS, FOLDER_INBOX, FOLDER_SENT, FOLDER_TRASH, SORT_DATE, SORT_SENDER, SORT_SUBJECT |
Constructor Summary | |
---|---|
DbPrivateMessageFolder()
Constructor for internal use only. |
|
DbPrivateMessageFolder(int folderID,
long userID)
Loads an existing private message folder. |
|
DbPrivateMessageFolder(long userID,
java.lang.String name)
Creates a new folder. |
Method Summary | |
---|---|
void |
deleteMessage(PrivateMessage privateMessage)
Deletes a private message from the folder by moving it to the trash folder. |
boolean |
equals(java.lang.Object object)
|
int |
getCachedSize()
Returns the approximate size of the Object in bytes. |
int |
getID()
Returns the ID of the folder. |
int |
getMessageCount()
Returns the number of messages in the folder. |
java.util.Iterator |
getMessages()
Returns all the messages in the folder sorted by date descending. |
java.util.Iterator |
getMessages(int startIndex,
int count,
int sortField,
boolean sortDescending)
Returns messages in the folder based on the params. |
java.lang.String |
getName()
Returns the name of the folder. |
User |
getOwner()
Returns the owner of the private message folder. |
int |
getUnreadMessageCount()
Returns the number of unread messages in the folder. |
int |
hashCode()
|
void |
moveMessage(PrivateMessage privateMessage,
PrivateMessageFolder destinationFolder)
Moves a private message to another folder. |
void |
readExternal(java.io.DataInput in)
|
void |
setName(java.lang.String name)
Sets the name of the folder. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.DataOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DbPrivateMessageFolder(int folderID, long userID) throws PrivateMessageFolderNotFoundException
folderID
- the ID of the folder.userID
- the ID of the user that owns the folder.
PrivateMessageFolderNotFoundException
- if unable to load the folder.public DbPrivateMessageFolder(long userID, java.lang.String name)
userID
- the ID of the user that will own the folder.name
- the name of the new folder.public DbPrivateMessageFolder()
Method Detail |
---|
public int getID()
PrivateMessageFolder
getID
in interface PrivateMessageFolder
public User getOwner()
PrivateMessageFolder
getOwner
in interface PrivateMessageFolder
public java.lang.String getName()
PrivateMessageFolder
getName
in interface PrivateMessageFolder
public void setName(java.lang.String name)
PrivateMessageFolder
setName
in interface PrivateMessageFolder
name
- the new name for the folder.public int getMessageCount()
PrivateMessageFolder
getMessageCount
in interface PrivateMessageFolder
public int getUnreadMessageCount()
PrivateMessageFolder
getUnreadMessageCount
in interface PrivateMessageFolder
public java.util.Iterator getMessages()
PrivateMessageFolder
getMessages
in interface PrivateMessageFolder
public java.util.Iterator getMessages(int startIndex, int count, int sortField, boolean sortDescending)
PrivateMessageFolder
INBOX
-- the user's inbox.
PrivateMessageFolder.SORT_DATE
-- sort messages by date.
PrivateMessageFolder.SORT_SENDER
-- sort messages by sender.
PrivateMessageFolder.SORT_SUBJECT
-- sort messages by subject.
getMessages
in interface PrivateMessageFolder
startIndex
- the start index of messages to return (0 starts at the beginning).count
- the number of messages to return.sortField
- the filed to sort on.sortDescending
- true if the messages should be sorted in descending order.
For example, if the sort field is date and sortDescending is true, messages will
be returned newest to oldest.
public void deleteMessage(PrivateMessage privateMessage)
PrivateMessageFolder
deleteMessage
in interface PrivateMessageFolder
privateMessage
- the private message to delete.public void moveMessage(PrivateMessage privateMessage, PrivateMessageFolder destinationFolder)
PrivateMessageFolder
moveMessage
in interface PrivateMessageFolder
privateMessage
- the message to move.destinationFolder
- the folder to move the message to.public int getCachedSize()
Cacheable
getCachedSize
in interface Cacheable
public void readExternal(java.io.DataInput in) throws java.io.IOException
readExternal
in interface com.tangosol.io.ExternalizableLite
java.io.IOException
public void writeExternal(java.io.DataOutput out) throws java.io.IOException
writeExternal
in interface com.tangosol.io.ExternalizableLite
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |