Package net.sf.jasperreports.engine.data
Class JRTableModelDataSource
- java.lang.Object
-
- net.sf.jasperreports.engine.data.JRTableModelDataSource
-
- All Implemented Interfaces:
JRDataSource,JRRewindableDataSource
public class JRTableModelDataSource extends java.lang.Object implements JRRewindableDataSource
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXCEPTION_MESSAGE_KEY_UNKNOWN_COLUMN_NAME
-
Constructor Summary
Constructors Constructor Description JRTableModelDataSource(javax.swing.table.TableModel model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetFieldValue(JRField jrField)Gets the field value for the current position.voidmoveFirst()Moves back to the first element in the data source.booleannext()Tries to position the cursor on the next element in the data source.
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_UNKNOWN_COLUMN_NAME
public static final java.lang.String EXCEPTION_MESSAGE_KEY_UNKNOWN_COLUMN_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
next
public boolean next()
Description copied from interface:JRDataSourceTries to position the cursor on the next element in the data source.- Specified by:
nextin interfaceJRDataSource- Returns:
- true if there is a next record, false otherwise
-
getFieldValue
public java.lang.Object getFieldValue(JRField jrField) throws JRException
Description copied from interface:JRDataSourceGets the field value for the current position.- Specified by:
getFieldValuein interfaceJRDataSource- Returns:
- an object containing the field value. The object type must be the field object type.
- Throws:
JRException
-
moveFirst
public void moveFirst()
Description copied from interface:JRRewindableDataSourceMoves back to the first element in the data source.- Specified by:
moveFirstin interfaceJRRewindableDataSource
-
-