com.peter.message
Class Message

java.lang.Object
  |
  +--com.peter.message.Message

public class Message
extends java.lang.Object

This class contains all data for the Message.

Version:
$Revision: 1.0.2, 2003-11-10 $
Author:
Peter Larsson

Field Summary
static java.text.SimpleDateFormat dateFormat
           
 
Constructor Summary
Message()
           
Message(int id)
           
Message(int id, int topic_id)
           
Message(int id, int topic_id, int author_id, java.lang.String msg, java.util.Date postDate)
           
Message(java.lang.String msg)
           
 
Method Summary
 int getAuthorID()
           
 java.lang.String getDate()
           
 int getID()
           
static Message getMessage(java.util.HashMap map)
          Converts a HashMap to a new Message
 java.lang.String getMsg()
           
 int getTopicID()
           
 java.lang.String removeHtml(java.lang.String str)
          Removes HTML from a string.
 void setAuthorID(int id)
           
 void setDate(java.util.Date d)
           
 void setID(int id)
           
 void setMsg(java.lang.String msg)
           
 void setTopicID(int topic_id)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateFormat

public static final java.text.SimpleDateFormat dateFormat
Constructor Detail

Message

public Message()

Message

public Message(int id)

Message

public Message(int id,
               int topic_id)

Message

public Message(java.lang.String msg)

Message

public Message(int id,
               int topic_id,
               int author_id,
               java.lang.String msg,
               java.util.Date postDate)
Method Detail

getID

public int getID()

getTopicID

public int getTopicID()

getAuthorID

public int getAuthorID()

getMsg

public java.lang.String getMsg()

getDate

public java.lang.String getDate()

getMessage

public static Message getMessage(java.util.HashMap map)
Converts a HashMap to a new Message
Parameters:
map - A HashMap with the data for ONE instance of this class
Returns:
Returns a new Message

setID

public void setID(int id)

setTopicID

public void setTopicID(int topic_id)

setAuthorID

public void setAuthorID(int id)

setMsg

public void setMsg(java.lang.String msg)

setDate

public void setDate(java.util.Date d)

removeHtml

public java.lang.String removeHtml(java.lang.String str)

Removes HTML from a string.

Parameters:
str - The String to remove html from
Returns:
Return String without HTML