com.peter.message
Class DBMessage

java.lang.Object
  |
  +--com.peter.db.DBAccess
        |
        +--com.peter.message.DBMessage

public class DBMessage
extends DBAccess

This class handles the queries to the Database. It is ment to be used for Message.

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

Constructor Summary
DBMessage(DBConHandler handler)
          The constructor for this object
 
Method Summary
 int addMessage(Message message)
          Adds one Message to the database.
 int deleteMessage(Message message)
          Deleting one object from the database.
 Message[] getMessageFromDBM(DBMatrix dbm)
          Returns an array of fetched Message from the database.
 Message[] getMessages()
          Fetch an array of Message from the database.
 Message[] getMessages(Message message)
          Fetch an array of Message from the database, with the same value as each variable in message has.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBMessage

public DBMessage(DBConHandler handler)
The constructor for this object
Parameters:
handler - The handler to use for SQL-queries
Method Detail

getMessageFromDBM

public Message[] getMessageFromDBM(DBMatrix dbm)
Returns an array of fetched Message from the database.
Parameters:
dbm - The DBMatrix
Returns:
An array of Message

addMessage

public int addMessage(Message message)

Adds one Message to the database.

Parameters:
message - A Message
Returns:
An integer representing the result

deleteMessage

public int deleteMessage(Message message)

Deleting one object from the database.

Parameters:
message - A Message
Returns:
An integer representing the result

getMessages

public Message[] getMessages()

Fetch an array of Message from the database.

Returns:
An array of Message

getMessages

public Message[] getMessages(Message message)

Fetch an array of Message from the database, with the same value as each variable in message has.

Parameters:
message - A Message
Returns:
An array of Message