|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.arsdigita.acs.SeekableSelection
Represents a generic multiple-row data source pulled in from the database. Stores all query results in memory because of the requirements of the templating system (must be able to traverse query results multiple times, must provide rowcount). Entity objects for doing logical operations on more specific database objects should extend Selection, adding additional accessors for derived properties as needed.
| Fields inherited from interface com.arsdigita.acs.MultiDataSource |
cvsId |
| Constructor Summary | |
SeekableSelection(java.lang.Object obj)
Casts the given object to SimpleResultSet |
|
SeekableSelection(com.arsdigita.db.SimpleResultSet srs)
Creates a new SeekableSelection, initialized from a SimpleResultSet. |
|
| Method Summary | |
boolean |
contains(java.lang.String column)
Returns true if this contains a column named
column. |
java.lang.String |
get(java.lang.String key)
Returns the value of the column named by key. |
java.lang.Object |
getObject(java.lang.String key)
Returns the value of the column named by key. |
java.lang.String[] |
keys()
Returns a list of available keys (column names) in the Selection. |
boolean |
next()
Advances to the next row in the data source, if there is one. |
int |
rowcount()
Returns the number of rows in this datasource. |
int |
rownum()
Returns the current row number in the datasource. |
void |
seek(int rownum)
Sets the current row to the given (one-based) row number. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SeekableSelection(java.lang.Object obj)
throws java.sql.SQLException
public SeekableSelection(com.arsdigita.db.SimpleResultSet srs)
throws java.sql.SQLException
| Method Detail |
public boolean contains(java.lang.String column)
throws DataSourceException
true if this contains a column named
column.contains in interface DataSource
public void seek(int rownum)
throws DataSourceException
seek(0) if you want to reset the datasource to
its initial state.seek in interface MultiDataSource
public java.lang.String get(java.lang.String key)
throws DataSourceException
key.
Returns null if the column value is null.get in interface DataSourceInvalidKeyException - if key is not found.
public java.lang.Object getObject(java.lang.String key)
throws DataSourceException
key.
Returns null if the column value is null.InvalidKeyException - if key is not found.
public boolean next()
throws DataSourceException
next in interface MultiDataSource
public java.lang.String[] keys()
throws DataSourceException
keys in interface DataSource
public int rownum()
throws DataSourceException
rownum in interface MultiDataSource
public int rowcount()
throws DataSourceException
rowcount in interface MultiDataSource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||