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, getLocale, getNumberPattern, getTextAttributes, getTimeZone, setDatePattern, setLocale, setLocale, setNumberPattern, setTextAttributes, setTextAttributes, setTimeZone, setTimeZone
public 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
JRException
public JsonQLDataSource(File file) throws JRException
JRException
public JsonQLDataSource(InputStream jsonInputStream, String selectExpression) throws JRException
JRException
public JsonQLDataSource(InputStream jsonInputStream) throws JRException
JRException
public JsonQLDataSource(JasperReportsContext jasperReportsContext, String jsonSource, String selectExpression) throws JRException
JRException
public JsonQLDataSource(RepositoryContext repositoryContext, String jsonSource, String selectExpression) throws JRException
JRException
protected JsonQLDataSource(com.fasterxml.jackson.databind.JsonNode jacksonJsonTree, String selectExpression) throws JRException
JRException
protected JsonQLDataSource(JRJsonNode root, String selectExpression) throws JRException
JRException
public void moveFirst() throws JRException
JRRewindableDataSource
moveFirst
in interface JRRewindableDataSource
JRException
public boolean next() throws JRException
JRDataSource
next
in interface JRDataSource
JRException
- if any error occurs while trying to move to the next elementpublic int recordCount()
recordCount
in interface RandomAccessDataSource
public int currentIndex()
currentIndex
in interface RandomAccessDataSource
public void moveToRecord(int index) throws NoRecordAtIndexException
moveToRecord
in interface RandomAccessDataSource
NoRecordAtIndexException
public Object getFieldValue(JRField jrField) throws JRException
JRDataSource
getFieldValue
in interface JRDataSource
JRException
public JsonQLDataSource subDataSource() throws JRException
subDataSource
in interface HierarchicalDataSource<JsonQLDataSource>
JRException
public JsonQLDataSource subDataSource(String selectExpression) throws JRException
subDataSource
in interface HierarchicalDataSource<JsonQLDataSource>
JRException
protected Object getConvertedValue(JRJsonNode node, JRField jrField) throws JRException
JRException
Copyright © 2023 Cloud Software Group, Inc.. All rights reserved.