blackboard.data.discussionboard
Class MessageStatus

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.discussionboard.MessageStatus
All Implemented Interfaces:
IBbObject, Identifiable, java.lang.Cloneable

public class MessageStatus
extends BbObject

The MessageStatus object wraps the state of a user's interaction with a given piece of message and adaptive release status.

It is not a persistent object in the ordinary sense; it is loaded from the database, but combines information derived from different sources. With this in mind, one cannot "save" a MessageStatus object.


Field Summary
static DataType DATA_TYPE
           
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Constructor Summary
MessageStatus()
          Default constructor.
 
Method Summary
 java.lang.Integer getAncestorDistance()
          Returns the ancestor distance of a message
 Message getAncestorObject()
          Returns the ancestor message of a message
 java.lang.Integer getAncestorPK()
          Returns the ancestor pk of a message
 float getAverageRating()
          Returns the average rating of a message
 DataType getDataType()
          Returns the DataType identifier for this object.
 boolean getHasAttachment()
          Returns whether this message has attachment
 boolean getHasSubscription()
          Returns whether the user is subscribed to this message
 boolean getIsFlagged()
          Returns whether this message is flagged
 boolean getIsRead()
          Returns whether this message is read
 int getNumberOfChildren()
          Returns the number of children of a message
 int getNumberOfChildrenNoDraft()
          Returns the number of non-draft children of a message
 java.lang.Integer getParentPosition()
          Returns the parent position of a message
 int getReadCount()
          Returns the number of read child messages ONLY of this message.
 int getReadCountInclSelf()
          Returns the number of read children this message has INCLUDING this message itself if it is read.
 int getRoundedAverageRating()
          Returns the average rating of a message
 java.lang.String getTopic()
          Returns the topic associated with this message
 int getTotalCount()
          Returns ONLY the number of children this message has.
 int getTotalCountInclSelf()
          Returns the number of children this message has INCLUDING this message itself.
 int getTotalViews()
          Returns the total views of a message
 int getUnreadChildrenCount()
          Returns the number of unread children ONLY.
 int getUnreadCountOfSelfAndChildren()
          Returns the number of unread children INCLUDING this message itself.
 void setAncestorDistance(java.lang.Integer pk1)
          Sets the ancestor distance of a message
 void setAncestorPK(java.lang.Integer pk1)
          Sets the ancestor pk of a message
 void setAverageRating(float n)
          Sets the average rating of a message
 void setHasAttachment(boolean b)
          Sets whether this message has attachment
 void setHasSubscription(boolean b)
          Sets whether the user is subscribed to this message
 void setIsFlagged(boolean b)
          Sets whether this message is flagged
 void setIsRead(boolean b)
          Sets whether this message is read
 void setNumberOfChildren(int n)
          Sets the number of children of a message
 void setNumberOfChildrenNoDraft(int n)
          Sets the number of non-draft children of a message
 void setParentPosition(java.lang.Integer pk1)
          Sets the parent position of a message
 void setReadCount(int n)
          Sets ONLY the number of read children this message has.
 void setTopic(java.lang.String topic)
          Sets the topic associated with this message
 void setTotalCount(int n)
          Sets ONLY the number of children this message has.
 void setTotalViews(int n)
          Sets the total views of a message
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, getModifiedDate, persist, setCreatedDate, setId, setModifiedDate, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_TYPE

public static DataType DATA_TYPE
Constructor Detail

MessageStatus

public MessageStatus()
Default constructor. This method is public because of requirements in the persistence framework. Instantiating on object in this way is not very useful, since the data cannot be persisted.

If you need to access status for a particular piece of message, use MessageDbLoader

Method Detail

getDataType

public DataType getDataType()
Returns the DataType identifier for this object. Can be used to uniquely identify the "type" of this data object.

Specified by:
getDataType in interface IBbObject
Specified by:
getDataType in interface Identifiable
Specified by:
getDataType in class BbObject
Returns:
the DataType for this object

getAncestorPK

public java.lang.Integer getAncestorPK()
Returns the ancestor pk of a message

Returns:
the ancestor pk of a message

setAncestorPK

public void setAncestorPK(java.lang.Integer pk1)
Sets the ancestor pk of a message

Parameters:
pk1 - the ancestor pk of a message

getAncestorObject

public Message getAncestorObject()
Returns the ancestor message of a message

Returns:
the ancestor message of a message

getIsRead

public boolean getIsRead()
Returns whether this message is read

Returns:
true if this message is read, false otherwise

setIsRead

public void setIsRead(boolean b)
Sets whether this message is read

Parameters:
b - true if this message is read, false otherwise

getIsFlagged

public boolean getIsFlagged()
Returns whether this message is flagged

Returns:
true if this message is flagged, false otherwise

setIsFlagged

public void setIsFlagged(boolean b)
Sets whether this message is flagged

Parameters:
b - true if this message is flagged, false otherwise

getHasAttachment

public boolean getHasAttachment()
Returns whether this message has attachment

Returns:
true if this message has attachment, false otherwise

setHasAttachment

public void setHasAttachment(boolean b)
Sets whether this message has attachment

Parameters:
b - true if this message has attachment, false otherwise

getHasSubscription

public boolean getHasSubscription()
Returns whether the user is subscribed to this message

Returns:

setHasSubscription

public void setHasSubscription(boolean b)
Sets whether the user is subscribed to this message

Parameters:
b - true if the user is subscribed to this message

getParentPosition

public java.lang.Integer getParentPosition()
Returns the parent position of a message

Returns:
the parent position of a message

setParentPosition

public void setParentPosition(java.lang.Integer pk1)
Sets the parent position of a message

Parameters:
pk1 - the parent position of a message

getAncestorDistance

public java.lang.Integer getAncestorDistance()
Returns the ancestor distance of a message

Returns:
the ancestor distance of a message

setAncestorDistance

public void setAncestorDistance(java.lang.Integer pk1)
Sets the ancestor distance of a message

Parameters:
pk1 - the ancestor distance of a message

setTopic

public void setTopic(java.lang.String topic)
Sets the topic associated with this message

Parameters:
topic - a String containing the topic for this message

getTopic

public java.lang.String getTopic()
Returns the topic associated with this message

Returns:
the topic value of this message as a String

getNumberOfChildren

public int getNumberOfChildren()
Returns the number of children of a message

Returns:
the number of children of a message

setNumberOfChildren

public void setNumberOfChildren(int n)
Sets the number of children of a message

Parameters:
n - the number of children of a message

getNumberOfChildrenNoDraft

public int getNumberOfChildrenNoDraft()
Returns the number of non-draft children of a message

Returns:
the number of non-draft children of a message

setNumberOfChildrenNoDraft

public void setNumberOfChildrenNoDraft(int n)
Sets the number of non-draft children of a message

Parameters:
n - the number of non-draft children of a message

getTotalViews

public int getTotalViews()
Returns the total views of a message

Returns:
the total views of a message

setTotalViews

public void setTotalViews(int n)
Sets the total views of a message

Parameters:
n - the total views of a message

getAverageRating

public float getAverageRating()
Returns the average rating of a message

Returns:
the average rating of a message

setAverageRating

public void setAverageRating(float n)
Sets the average rating of a message

Parameters:
n - the average rating of a message

getRoundedAverageRating

public int getRoundedAverageRating()
Returns the average rating of a message

Returns:
the average rating of a message

getTotalCount

public int getTotalCount()
Returns ONLY the number of children this message has. The count does not include the current message itself.

Returns:

getTotalCountInclSelf

public int getTotalCountInclSelf()
Returns the number of children this message has INCLUDING this message itself.

Returns:

setTotalCount

public void setTotalCount(int n)
Sets ONLY the number of children this message has. The count does not include the current message itself.

Parameters:
n - the total count of children

getReadCount

public int getReadCount()
Returns the number of read child messages ONLY of this message. The count does not include the current message itself.

Returns:

getReadCountInclSelf

public int getReadCountInclSelf()
Returns the number of read children this message has INCLUDING this message itself if it is read.

Returns:

setReadCount

public void setReadCount(int n)
Sets ONLY the number of read children this message has. The count does not include the current message itself.

Parameters:
n - the read count of a message

getUnreadChildrenCount

public int getUnreadChildrenCount()
Returns the number of unread children ONLY. The count does not include this message itself.

Returns:

getUnreadCountOfSelfAndChildren

public int getUnreadCountOfSelfAndChildren()
Returns the number of unread children INCLUDING this message itself.

Returns:


Copyright © 2003 Blackboard, Inc. All Rights Reserved.