Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.ban
Class BanDAOImpl

java.lang.Object
  extended by com.jivesoftware.base.ban.BanDAOImpl
All Implemented Interfaces:
BanDAO

public class BanDAOImpl
extends java.lang.Object
implements BanDAO

Defines methods used to create, access, update, and remove banned objects.

Database script to create jiveBannedUser table

 CREATE TABLE jiveBan (
 banID            BIGINT          NOT NULL,
 banType          INTEGER         NOT NULL,
 bannedUserID     BIGINT          NULL,
 ipAddress        VARCHAR(15)     NULL,
 adminID          BIGINT          NOT NULL,
 banLevel         INTEGER         NOT NULL,
 creationDate     BIGINT          NOT NULL,
 expirationDate   BIGINT          NULL,
 comments         VARCHAR(50)     NULL,
 CONSTRAINT jiveBan_pk PRIMARY KEY (banID)
 );
 


Method Summary
 void createBan(Ban ban)
          Creates a ticket entry in the database
 Ban getBan(long userID, BanLevel banLevel)
          Gets a Ban Object from the database.
 Ban getBan(java.lang.String ipAddress, BanLevel banLevel)
          Gets a Ban Object from the database.
 java.util.List getBans()
          Gets an unfiltered list of Ban objects from database
 java.util.List getBans(BanFilter filter)
          Gets a filtered list of Ban objects from the database
static BanDAO getInstance()
           
 void removeBan(long banID)
          Removes a Ban entry from the database
 void updateBan(Ban ban)
          Updates a ticket entry in the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static BanDAO getInstance()

createBan

public void createBan(Ban ban)
Description copied from interface: BanDAO
Creates a ticket entry in the database

Specified by:
createBan in interface BanDAO
Parameters:
ban - the ticket to create

updateBan

public void updateBan(Ban ban)
Description copied from interface: BanDAO
Updates a ticket entry in the database

Specified by:
updateBan in interface BanDAO
Parameters:
ban - the ticket to update

removeBan

public void removeBan(long banID)
Description copied from interface: BanDAO
Removes a Ban entry from the database

Specified by:
removeBan in interface BanDAO
Parameters:
banID - the id of the ban to remove

getBan

public Ban getBan(long userID,
                  BanLevel banLevel)
Description copied from interface: BanDAO
Gets a Ban Object from the database.

Specified by:
getBan in interface BanDAO
Parameters:
userID - userID the ID of the user
banLevel - the level of the ban
Returns:
the Ban object if one exists; null otherwise.

getBan

public Ban getBan(java.lang.String ipAddress,
                  BanLevel banLevel)
Description copied from interface: BanDAO
Gets a Ban Object from the database.

Specified by:
getBan in interface BanDAO
Parameters:
ipAddress - the IP Address of the ban
banLevel - the level of the ban
Returns:
the Ban object if one exists; null otherwise.

getBans

public java.util.List getBans()
Description copied from interface: BanDAO
Gets an unfiltered list of Ban objects from database

Specified by:
getBans in interface BanDAO
Returns:
a list of Ban objects

getBans

public java.util.List getBans(BanFilter filter)
Description copied from interface: BanDAO
Gets a filtered list of Ban objects from the database

Specified by:
getBans in interface BanDAO
Parameters:
filter - the BanFilter object
Returns:
a filtered list of Ban objects
See Also:
Ban

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.