Class SQLReportData
java.lang.Object
org.jfree.report.modules.data.sql.SQLReportData
- All Implemented Interfaces:
DataSet,ReportData
Creation-Date: 19.02.2006, 17:37:42
- Author:
- Thomas Morgner
-
Field Summary
Fields inherited from interface org.jfree.report.ReportData
BEFORE_FIRST_ROW -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the datasource.get(int column) intgetColumnName(int column) intintbooleanThis operation checks, whether a call to next will be likely to succeed.booleanbooleanChecks, whether this report-data instance is currently readable.booleannext()This method produces the same result as 'setCursorPosition(getCursorPosition() + 1);'booleansetCursorPosition(int row) Moves the cursor back to an already visited position.
-
Constructor Details
-
SQLReportData
public SQLReportData(ResultSet resultSet, boolean labelMapping) throws SQLException, DataSourceException - Throws:
SQLExceptionDataSourceException
-
-
Method Details
-
isLabelMapping
public boolean isLabelMapping() -
getRowCount
- Throws:
DataSourceException
-
isAdvanceable
This operation checks, whether a call to next will be likely to succeed. If there is a next data row, this should return true.- Specified by:
isAdvanceablein interfaceReportData- Returns:
- Throws:
DataSourceException
-
getColumnCount
- Specified by:
getColumnCountin interfaceDataSet- Throws:
DataSourceException
-
setCursorPosition
Description copied from interface:ReportDataMoves the cursor back to an already visited position. Calling this method for an row number that has not yet been read using 'next' is undefined, whether that call succeeds is implementation dependent. Calls to position zero (aka BEFORE_FIRST_ROW) will always succeeed (unless there is a physical error, which invalidated the whole report-data object).- Specified by:
setCursorPositionin interfaceReportData- Parameters:
row-- Returns:
- true, if moving the cursor succeeded, false otherwise.
- Throws:
DataSourceException
-
next
Description copied from interface:ReportDataThis method produces the same result as 'setCursorPosition(getCursorPosition() + 1);'- Specified by:
nextin interfaceReportData- Returns:
- Throws:
DataSourceException
-
close
Description copied from interface:ReportDataCloses the datasource. This should be called at the end of each report processing run. Whether this closes the underlying data-source backend depends on the ReportDataFactory. Calling 'close()' on the ReportDataFactory *must* close all report data objects.- Specified by:
closein interfaceReportData- Throws:
DataSourceException
-
getColumnName
- Specified by:
getColumnNamein interfaceDataSet- Throws:
DataSourceException
-
get
- Specified by:
getin interfaceDataSet- Throws:
DataSourceException
-
getCursorPosition
- Specified by:
getCursorPositionin interfaceReportData- Throws:
DataSourceException
-
isReadable
Description copied from interface:ReportDataChecks, whether this report-data instance is currently readable. A report-data instance cannot be readable if it is positioned before the first row. (The look-ahead system of 'isAdvanceable()' will prevent that the datasource is positioned behind the last row.)- Specified by:
isReadablein interfaceReportData- Returns:
- true, if the datarow is valid, false otherwise.
- Throws:
DataSourceException
-