com.arsdigita.acs.bboard
Class SingleTopicDataSource

java.lang.Object
  |
  +--com.arsdigita.acs.Selection
        |
        +--com.arsdigita.acs.bboard.TopicsDataSource
              |
              +--com.arsdigita.acs.bboard.SingleTopicDataSource
All Implemented Interfaces:
DataSource

public class SingleTopicDataSource
extends TopicsDataSource

Class to represent a single bboard topic. Has a special constructor for querying the database, pulling in all the available attributes from the bboard_topics table.


Fields inherited from class com.arsdigita.acs.Selection
ctr, db, rs, rsmd
 
Constructor Summary
SingleTopicDataSource(Database db, Integer topicId)
          Initialize this from the database; gets all properties from bboard_topics where topic_id = topicId.
SingleTopicDataSource(Database db, String messageId)
          Returns the Topic datasource object for a given message; pulls in the topic to which that message belongs.
SingleTopicDataSource(ResultSet rs)
           
 
Method Summary
 boolean contains(String key)
          Returns true if this contains a column named column.
 String get(String key)
          Generic get-property accessor.
 String[] keys()
          Returns a list of available keys (column names) in the Selection.
 
Methods inherited from class com.arsdigita.acs.bboard.TopicsDataSource
adminAuthorize, authorizeUser, getBackLink, getModerationPolicy
 
Methods inherited from class com.arsdigita.acs.Selection
dumpBLOB, freeze, getBLOB, next, rownum
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleTopicDataSource

public SingleTopicDataSource(ResultSet rs)
                      throws SQLException,
                             IOException

SingleTopicDataSource

public SingleTopicDataSource(Database db,
                             Integer topicId)
                      throws SQLException,
                             IOException,
                             PageValidationException
Initialize this from the database; gets all properties from bboard_topics where topic_id = topicId.

SingleTopicDataSource

public SingleTopicDataSource(Database db,
                             String messageId)
                      throws SQLException,
                             IOException,
                             PageValidationException
Returns the Topic datasource object for a given message; pulls in the topic to which that message belongs.
Method Detail

contains

public boolean contains(String key)
                 throws DataSourceException
Description copied from class: Selection
Returns true if this contains a column named column.
Overrides:
contains in class Selection

get

public String get(String key)
           throws DataSourceException
Description copied from class: Selection
Generic get-property accessor. Returns the value of the column named by key; if it's a CLOB column, still returns the text from the CLOB. If it's a DATE column, returns an ANSI date string (yyyy-mm-dd). Returns an empty string if the column is null (a perhaps unnecessary evil to prevent the string "null" from popping up in JSP pages--probably should get rid of this with more consistent use of ad:sub tag!).
Overrides:
get in class Selection
Following copied from class: com.arsdigita.acs.Selection
Throws:
InvalidKeyException - if key is not found.

keys

public String[] keys()
Description copied from class: Selection
Returns a list of available keys (column names) in the Selection.
Overrides:
keys in class Selection