public class ColumnValuesDataSource extends Object implements JRRewindableDataSource, IndexedDataSource
| Modifier and Type | Field and Description |
|---|---|
static String |
EXCEPTION_MESSAGE_KEY_INVALID_SNAPSHOT_FIELD_TYPE |
static String |
EXCEPTION_MESSAGE_KEY_NO_SUCH_SNAPSHOT_FIELD |
| Constructor and Description |
|---|
ColumnValuesDataSource(String[] fieldNames,
int size,
ColumnValues[] values) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getFieldValue(JRField field)
Gets the field value for the current position.
|
int |
getRecordIndex()
Returns the index of the current record in the data source.
|
void |
moveFirst()
Moves back to the first element in the data source.
|
boolean |
next()
Tries to position the cursor on the next element in the data source.
|
public static final String EXCEPTION_MESSAGE_KEY_INVALID_SNAPSHOT_FIELD_TYPE
public static final String EXCEPTION_MESSAGE_KEY_NO_SUCH_SNAPSHOT_FIELD
public ColumnValuesDataSource(String[] fieldNames, int size, ColumnValues[] values)
public boolean next()
throws JRException
JRDataSourcenext in interface JRDataSourceJRException - if any error occurs while trying to move to the next elementpublic Object getFieldValue(JRField field) throws DataSnapshotException
JRDataSourcegetFieldValue in interface JRDataSourceDataSnapshotExceptionpublic void moveFirst()
JRRewindableDataSourcemoveFirst in interface JRRewindableDataSourcepublic int getRecordIndex()
IndexedDataSourcegetRecordIndex in interface IndexedDataSourceCopyright © 2017. All rights reserved.