|
SilverStream Application Server 3.5 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Abstraction of a data row factory. The factory is used by the low-level
data source implementation for constructing data rows. This allows the
client of the data source to hold its own per-row information in the
data row. See AgiDataSource for details.
| Method Summary | |
AgiDataRow |
createDataRow(String rowKey)
Create an empty data row. |
AgiDataRow |
createDataRow(String rowKey,
Object[] values)
Create a data row, given an array of row values of the appropriate type. |
| Method Detail |
public AgiDataRow createDataRow(String rowKey)
rowKey - An object used by the caller to identify the rowEvery object that implements AgiDataSource is initialized by its creator with a data row factory belonging to the creator, which is to be used by the AgiDataSource to create the rows it returns:
AgiDataRowFactory m_rowFactory;
ResultSet rs = statement.executeQuery();
if (rs.next()) {
AgiDataRow nextRow = m_rowFactory.createDataRow(null);
for (int i = 0; i < columnCount; i++) {
nextRow.setData(i, rs.getObject(i+1));
}
}
public AgiDataRow createDataRow(String rowKey,
Object[] values)
rowKey - a string used by the caller to identify the rowvalues - initial values for each column of the rowEvery object that implements AgiDataSource is initialized by its creator with a data row factory belonging to the creator, which is to be used by the AgiDataSource to create the rows it returns:
AgiDataRowFactory m_rowFactory;
ResultSet rs = statement.executeQuery();
if (rs.next()) {
Object[] values = new Object[columnCount];
for (int i = 0; i < columnCount; i++) {
values[i] = rs.getObject(i+1));
}
AgiDataRow nextRow = m_rowFactory.createDataRow(null, values);
}
|
SilverStream Application Server 3.5 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||