Agentflow
V3.1

pe.pase
Class BBSMessage

java.lang.Object
  extended by pe.pase.BBSMessage
All Implemented Interfaces:
com.flowring.entity.Entity, java.io.Serializable, Listable
Direct Known Subclasses:
AFBBSMessage

public class BBSMessage
extends java.lang.Object
implements java.io.Serializable, Listable, com.flowring.entity.Entity

The class holds the information of bbs message.

Version:
1.1.5,
Author:
semap
See Also:
Serialized Form

Constructor Summary
BBSMessage()
          Constructor.
BBSMessage(java.lang.String id, java.lang.String subject, java.lang.String author, long postTime, java.lang.String boardID, int viewCount, java.lang.String boardName, java.lang.String startTime, java.lang.String endTime, java.lang.String memberId)
          Constructor.
BBSMessage(java.lang.String id, java.lang.String subject, java.lang.String author, long postTime, java.lang.String boardID, java.lang.String body, int viewCount, java.lang.String boardName, java.lang.String startTime, java.lang.String endTime, java.lang.String memberId)
          Constructor.
 
Method Summary
 int compare(int col, java.lang.Object obj)
          Compare the object in the specified column with the specified object
 void deleted()
          Delete this message
 boolean getAdjustableAtColumn(int col)
          Get adjustable of the specified column
 int getAlignmentAtColumn(int col)
          Get the alignment of the specified column
 java.lang.String getAuthor()
          Get the author of this message
 java.lang.String getBoardID()
          Get the board id
 java.lang.String getBoardName()
          Get the BoardName.
 java.lang.String getBody()
          Get the body of this message
 java.lang.String getColumnNameAtColumn(int col)
          Get column name of the specified column
 int getColumnSize()
          Get the column size
 int getColumnWidthAtColumn(int col)
          Get the column width of the specified column
 java.lang.String getEndTime()
           
 java.lang.String getEndTimeStr()
          Get the end time string
 long getGMTPostTime()
           
 java.lang.String getGMTPostTimeStr()
           
 java.lang.Object getHashKey()
           
 java.lang.String getID()
          Get the message id
 java.lang.String getMemberId()
           
 java.lang.Object getObjectAtColumn(int col)
          Get the object with the specified column
 long getPostTime()
          Get the post time of this message
 java.lang.String getPostTimeStr()
          Get the post time string
 java.lang.String getReplyMessage()
          Get the reply message
 java.lang.String getStartTime()
           
 java.lang.String getStartTimeStr()
          Get the start time string
 java.lang.String getSubject()
          Get the subject of this message
 java.lang.String getTimeString(long time)
          Get time string with the specified time
 int getViewCount()
          Get the View Count.
 boolean isContainBody()
          Check whether this message is containing body.
 boolean isDeleted()
          Check whether the message is deleted
 boolean isNew()
          Check whether this message is a new message
 boolean isPermission()
           
 boolean isReply()
          Check whether this message is a reply message
 void setAuthor(java.lang.String author)
          Set the author of this message
 void setBoardID(java.lang.String boardID)
          Set the board id
 void setBoardName(java.lang.String boardName)
           
 void setBody(java.lang.String body)
          Set the body of this message
 void setEndTime(java.lang.String endTime)
           
 void setGMTPostTime(long GMTPostTime)
           
 void setID(java.lang.String ID)
          Set the message id
 void setMemberId(java.lang.String memberId)
           
 void setNew(boolean b)
          Set this message is a new message or not a new message
 void setPermission(boolean permission)
           
 void setPostTime(long postTime)
          Set the post time of this message
 void setReply(java.lang.String applyMessageID)
          Set the reply message
 void setStartTime(java.lang.String startTime)
           
 void setSubject(java.lang.String subject)
          Set the subject of this message
 void setViewCount(int vc)
          Set the View Count.
 java.lang.String toString()
          Convert the data of this message to a string statement.
 void update(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BBSMessage

public BBSMessage()
Constructor. Construct a instance of BBSMessage without parameters. The value of variables in the instance which constructed by this constructor are all initial values.

Since:
version 1.1.0

BBSMessage

public BBSMessage(java.lang.String id,
                  java.lang.String subject,
                  java.lang.String author,
                  long postTime,
                  java.lang.String boardID,
                  int viewCount,
                  java.lang.String boardName,
                  java.lang.String startTime,
                  java.lang.String endTime,
                  java.lang.String memberId)
Constructor. Construct a instance of BBSMessage with the specified parameters. The message body of the instance which constructed by this constructor is null.

Parameters:
id - the given message id
subject - the subject of this message
author - the author's name of this message
postTime - the post time of this message
boardID - the id of the board which invloves this message
Since:
version 1.1.0

BBSMessage

public BBSMessage(java.lang.String id,
                  java.lang.String subject,
                  java.lang.String author,
                  long postTime,
                  java.lang.String boardID,
                  java.lang.String body,
                  int viewCount,
                  java.lang.String boardName,
                  java.lang.String startTime,
                  java.lang.String endTime,
                  java.lang.String memberId)
Constructor. Construct a instance of BBSMessage with the specified parameters.

Parameters:
id - the given message id
subject - the subject of this message
author - the author's name of this message
postTime - the post time of this message
boardID - the id of the board which invloves this message
body - the body of this message
Since:
version 1.1.0
Method Detail

compare

public int compare(int col,
                   java.lang.Object obj)
            throws java.util.NoSuchElementException
Compare the object in the specified column with the specified object

Specified by:
compare in interface Listable
Parameters:
col - the given column
obj - the given object
Returns:
true the two objects are the same; false otherwise
Throws:
java.util.NoSuchElementException - if col < 0 or col >= column size
Since:
version 1.1.0

deleted

public void deleted()
Delete this message

Since:
version 1.1.0

getAdjustableAtColumn

public boolean getAdjustableAtColumn(int col)
                              throws java.util.NoSuchElementException
Get adjustable of the specified column

Specified by:
getAdjustableAtColumn in interface Listable
Parameters:
col - the given column
Returns:
true the specified column is adjustable; fasle otherwise
Throws:
java.util.NoSuchElementException - if col < 0 or col >= column size
Since:
version 1.1.0

getAlignmentAtColumn

public int getAlignmentAtColumn(int col)
                         throws java.util.NoSuchElementException
Get the alignment of the specified column

Specified by:
getAlignmentAtColumn in interface Listable
Parameters:
col - the given column
Returns:
the alignment
Throws:
java.util.NoSuchElementException - if col < 0 or col >= column size
Since:
version 1.1.0

getAuthor

public java.lang.String getAuthor()
Get the author of this message

Returns:
the author name
Since:
version 1.1.0

getBoardID

public java.lang.String getBoardID()
Get the board id

Returns:
the id
Since:
version 1.1.0

getBoardName

public java.lang.String getBoardName()
Get the BoardName.

Since:
version 2.0

getBody

public java.lang.String getBody()
Get the body of this message

Returns:
the string
Since:
version 1.1.0

getColumnNameAtColumn

public java.lang.String getColumnNameAtColumn(int col)
                                       throws java.util.NoSuchElementException
Get column name of the specified column

Specified by:
getColumnNameAtColumn in interface Listable
Parameters:
col - the given column
Returns:
the column name
Throws:
java.util.NoSuchElementException - if col < 0 or col >= column size
Since:
version 1.1.0

getColumnSize

public int getColumnSize()
Get the column size

Specified by:
getColumnSize in interface Listable
Returns:
the clumnsize
Since:
version 1.1.0

getColumnWidthAtColumn

public int getColumnWidthAtColumn(int col)
                           throws java.util.NoSuchElementException
Get the column width of the specified column

Specified by:
getColumnWidthAtColumn in interface Listable
Parameters:
col - the given column
Returns:
the column width
Throws:
java.util.NoSuchElementException - if col < 0 or col >= column size
Since:
version 1.1.0

getEndTime

public java.lang.String getEndTime()

getEndTimeStr

public java.lang.String getEndTimeStr()
Get the end time string

Returns:
the end time string
Since:
version 1.1.0

getGMTPostTime

public long getGMTPostTime()

getGMTPostTimeStr

public java.lang.String getGMTPostTimeStr()

getHashKey

public java.lang.Object getHashKey()
Specified by:
getHashKey in interface com.flowring.entity.Entity

getID

public java.lang.String getID()
Get the message id

Returns:
the id
Since:
version 1.1.0

getMemberId

public java.lang.String getMemberId()

getObjectAtColumn

public java.lang.Object getObjectAtColumn(int col)
                                   throws java.util.NoSuchElementException
Get the object with the specified column

Specified by:
getObjectAtColumn in interface Listable
Parameters:
col - the given column
Returns:
the object
Throws:
java.util.NoSuchElementException - if col < 0 or col >= column size
Since:
version 1.1.0

getPostTime

public long getPostTime()
Get the post time of this message

Returns:
the post time
Since:
version 1.1.0

getPostTimeStr

public java.lang.String getPostTimeStr()
Get the post time string

Returns:
the post time string
Since:
version 1.1.0

getReplyMessage

public java.lang.String getReplyMessage()
Get the reply message

Returns:
the reply message id
Since:
version 1.1.0

getStartTime

public java.lang.String getStartTime()

getStartTimeStr

public java.lang.String getStartTimeStr()
Get the start time string

Returns:
the start time string
Since:
version 1.1.0

getSubject

public java.lang.String getSubject()
Get the subject of this message

Returns:
the subject
Since:
version 1.1.0

getTimeString

public java.lang.String getTimeString(long time)
Get time string with the specified time

Parameters:
time - the given time
Returns:
the time string
Since:
version 1.1.0

getViewCount

public int getViewCount()
Get the View Count.

Returns:
the Message View/Click count
Since:
version 2.0

isContainBody

public boolean isContainBody()
Check whether this message is containing body.

Returns:
true this message is containing body; false otherwise
Since:
version 1.1.0

isDeleted

public boolean isDeleted()
Check whether the message is deleted

Returns:
true the message is deleted; false otherwise
Since:
version 1.1.0

isNew

public boolean isNew()
Check whether this message is a new message

Returns:
true this message is a new message; false otherwise
Since:
version 1.1.0

isPermission

public boolean isPermission()

isReply

public boolean isReply()
Check whether this message is a reply message

Returns:
true this message is a reply message; false other wise
Since:
version 1.1.0

setAuthor

public void setAuthor(java.lang.String author)
Set the author of this message

Parameters:
author - the given author name
Since:
version 1.1.0

setBoardID

public void setBoardID(java.lang.String boardID)
Set the board id

Parameters:
boardID - the given id
Since:
version 1.1.0

setBoardName

public void setBoardName(java.lang.String boardName)

setBody

public void setBody(java.lang.String body)
Set the body of this message

Parameters:
body - the given string
Since:
version 1.1.0

setEndTime

public void setEndTime(java.lang.String endTime)

setGMTPostTime

public void setGMTPostTime(long GMTPostTime)

setID

public void setID(java.lang.String ID)
Set the message id

Parameters:
ID - the given id
Since:
version 1.1.0

setMemberId

public void setMemberId(java.lang.String memberId)

setNew

public void setNew(boolean b)
Set this message is a new message or not a new message

Parameters:
b - true the message is a new message; false the message is not a new message
Since:
version 1.1.0

setPermission

public void setPermission(boolean permission)

setPostTime

public void setPostTime(long postTime)
Set the post time of this message

Parameters:
postTime - the given post time
Since:
version 1.1.0

setReply

public void setReply(java.lang.String applyMessageID)
Set the reply message

Parameters:
appluMessageID - the given reply message's id
Since:
version 1.1.0

setStartTime

public void setStartTime(java.lang.String startTime)

setSubject

public void setSubject(java.lang.String subject)
Set the subject of this message

Parameters:
subject - the given subject
Since:
version 1.1.0

setViewCount

public void setViewCount(int vc)
Set the View Count.

Since:
version 2.0

toString

public java.lang.String toString()
Convert the data of this message to a string statement.

Overrides:
toString in class java.lang.Object
Returns:
a string
Since:
version 1.1.0

update

public void update(java.lang.Object obj)
Specified by:
update in interface com.flowring.entity.Entity

Agentflow
V3.1

Submit a bug or feature
Copyright 1999-2010 Flowring , Inc. 12F., No.120, Sec2, Gongdao 5th Rd.,
Hsinchu City 300, Taiwan (R.O.C.) All Rights Reserved.