public class JsonQLDataSource extends JRAbstractTextDataSource implements JsonData<JsonQLDataSource>, RandomAccessDataSource
| Modifier and Type | Field and Description |
|---|---|
static String |
EXCEPTION_MESSAGE_KEY_JSON_FIELD_VALUE_NOT_RETRIEVED |
static String |
EXCEPTION_MESSAGE_KEY_NO_DATA |
static String |
PROPERTY_FIELD_EXPRESSION
Property specifying the JSONQL expression for the dataset field.
|
EXCEPTION_MESSAGE_KEY_CANNOT_CONVERT_FIELD_TYPE, EXCEPTION_MESSAGE_KEY_CANNOT_MODIFY_PROPERTIES_AFTER_START, EXCEPTION_MESSAGE_KEY_NODE_NOT_AVAILABLE, EXCEPTION_MESSAGE_KEY_NULL_DOCUMENT, EXCEPTION_MESSAGE_KEY_NULL_SELECT_EXPRESSION, EXCEPTION_MESSAGE_KEY_UNKNOWN_COLUMN_NAME, EXCEPTION_MESSAGE_KEY_UNKNOWN_NUMBER_TYPE| Modifier | Constructor and Description |
|---|---|
|
JsonQLDataSource(File file) |
|
JsonQLDataSource(File file,
String selectExpression) |
|
JsonQLDataSource(InputStream jsonInputStream) |
|
JsonQLDataSource(InputStream jsonInputStream,
String selectExpression) |
|
JsonQLDataSource(JasperReportsContext jasperReportsContext,
String jsonSource,
String selectExpression) |
protected |
JsonQLDataSource(JRJsonNode root,
String selectExpression) |
protected |
JsonQLDataSource(com.fasterxml.jackson.databind.JsonNode jacksonJsonTree,
String selectExpression) |
|
JsonQLDataSource(RepositoryContext repositoryContext,
String jsonSource,
String selectExpression) |
| Modifier and Type | Method and Description |
|---|---|
int |
currentIndex() |
protected Object |
getConvertedValue(JRJsonNode node,
JRField jrField) |
protected String |
getFieldExpression(JRField field) |
Object |
getFieldValue(JRField jrField)
Gets the field value for the current position.
|
void |
moveFirst()
Moves back to the first element in the data source.
|
void |
moveToRecord(int index) |
boolean |
next()
Tries to position the cursor on the next element in the data source.
|
int |
recordCount() |
JsonQLDataSource |
subDataSource() |
JsonQLDataSource |
subDataSource(String selectExpression) |
convertNumber, convertStringValue, getConvertBean, getDatePattern, getFormattedDate, getFormattedNumber, getLocale, getNumberPattern, getTextAttributes, getTimeZone, setDatePattern, setLocale, setLocale, setNumberPattern, setTextAttributes, setTextAttributes, setTimeZone, setTimeZonepublic static final String EXCEPTION_MESSAGE_KEY_NO_DATA
public static final String EXCEPTION_MESSAGE_KEY_JSON_FIELD_VALUE_NOT_RETRIEVED
public static final String PROPERTY_FIELD_EXPRESSION
public JsonQLDataSource(File file, String selectExpression) throws JRException
JRExceptionpublic JsonQLDataSource(File file) throws JRException
JRExceptionpublic JsonQLDataSource(InputStream jsonInputStream, String selectExpression) throws JRException
JRExceptionpublic JsonQLDataSource(InputStream jsonInputStream) throws JRException
JRExceptionpublic JsonQLDataSource(JasperReportsContext jasperReportsContext, String jsonSource, String selectExpression) throws JRException
JRExceptionpublic JsonQLDataSource(RepositoryContext repositoryContext, String jsonSource, String selectExpression) throws JRException
JRExceptionprotected JsonQLDataSource(com.fasterxml.jackson.databind.JsonNode jacksonJsonTree,
String selectExpression)
throws JRException
JRExceptionprotected JsonQLDataSource(JRJsonNode root, String selectExpression) throws JRException
JRExceptionpublic void moveFirst()
throws JRException
JRRewindableDataSourcemoveFirst in interface JRRewindableDataSourceJRExceptionpublic boolean next()
throws JRException
JRDataSourcenext in interface JRDataSourceJRException - if any error occurs while trying to move to the next elementpublic int recordCount()
recordCount in interface RandomAccessDataSourcepublic int currentIndex()
currentIndex in interface RandomAccessDataSourcepublic void moveToRecord(int index)
throws NoRecordAtIndexException
moveToRecord in interface RandomAccessDataSourceNoRecordAtIndexExceptionpublic Object getFieldValue(JRField jrField) throws JRException
JRDataSourcegetFieldValue in interface JRDataSourceJRExceptionpublic JsonQLDataSource subDataSource() throws JRException
subDataSource in interface HierarchicalDataSource<JsonQLDataSource>JRExceptionpublic JsonQLDataSource subDataSource(String selectExpression) throws JRException
subDataSource in interface HierarchicalDataSource<JsonQLDataSource>JRExceptionprotected Object getConvertedValue(JRJsonNode node, JRField jrField) throws JRException
JRExceptionCopyright © 2020 TIBCO Software Inc.. All rights reserved.