com.arsdigita.acs.bboard
Class SingleMessageDataSource

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

public class SingleMessageDataSource
extends MessagesDataSource

Just like a MessagesDataSource, but ensures the next method exactly once; overrides next to always return false.


Field Summary
(package private)  Hashtable props
           
 
Fields inherited from class com.arsdigita.acs.Selection
ctr, db, rs, rsmd
 
Constructor Summary
SingleMessageDataSource(ResultSet rs)
           
SingleMessageDataSource(SqlStatement sql, Database db)
           
 
Method Summary
 String get(String key)
          Generic get-property accessor.
 String[] keys()
          Returns a list of available keys (column names) in the Selection.
 boolean next()
          Always returns false.
 void set(String key, Object value)
           
 
Methods inherited from class com.arsdigita.acs.bboard.MessagesDataSource
getCategory, getInterestLevel, getMessage, getPrettyFilename
 
Methods inherited from class com.arsdigita.acs.Selection
contains, dumpBLOB, freeze, getBLOB, rownum
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

props

Hashtable props
Constructor Detail

SingleMessageDataSource

public SingleMessageDataSource(SqlStatement sql,
                               Database db)
                        throws SQLException

SingleMessageDataSource

public SingleMessageDataSource(ResultSet rs)
                        throws SQLException,
                               IOException
Method Detail

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.

set

public void set(String key,
                Object value)

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

next

public boolean next()
Always returns false.
Overrides:
next in class Selection
Following copied from class: com.arsdigita.acs.Selection
Returns:
true; or false if there are no more elements.