com.peter.forum
Class DBForum

java.lang.Object
  |
  +--com.peter.db.DBAccess
        |
        +--com.peter.forum.DBForum

public class DBForum
extends DBAccess

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

Version:
$Revision: 1.0.1, 2003-09-14 $
Author:
Peter Larsson

Constructor Summary
DBForum(DBConHandler handler)
          The constructor for this object
 
Method Summary
 int addForum(Forum forum)
          Adding one Forum to the database.
 int deleteForum(Forum forum)
          Deleting one Forum from the database.
 Forum[] getForumFromDBM(DBMatrix dbm)
          Returns an array of fetched Objects from the database.
 Forum[] getForums()
          Fetch an array of Topic from the database.
 Forum[] getForums(Forum forum)
          Fetch an array of Forum from the database, with the same value as each variable in forum has.
 int updateForum(Forum forum)
          Update one object in the database.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBForum

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

getForumFromDBM

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

addForum

public int addForum(Forum forum)

Adding one Forum to the database.

Parameters:
forum - A Forum
Returns:
An integer representing the result

deleteForum

public int deleteForum(Forum forum)

Deleting one Forum from the database.

Parameters:
forum - A Forum
Returns:
An integer representing the result

updateForum

public int updateForum(Forum forum)

Update one object in the database.

Parameters:
forum - A Forum
Returns:
An integer representing the result

getForums

public Forum[] getForums()

Fetch an array of Topic from the database.

Returns:
An array of Topic

getForums

public Forum[] getForums(Forum forum)

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

Parameters:
forum - A Topic
Returns:
An array of Forum