public class JsonQueryHelper extends java.lang.Object implements IDataSourceQueryHelper
Constructor and Description |
---|
JsonQueryHelper(java.io.InputStream stream,
java.lang.String encoding,
JsonDataSource dsp) |
Modifier and Type | Method and Description |
---|---|
JsonResultSet |
createJsonResultSet(java.util.List<<any>> records,
java.lang.String query,
java.lang.String tagType) |
JsonResultSet |
createJsonResultSet(java.util.List resultList,
java.util.List pathList,
java.lang.String query,
java.lang.String tagType) |
java.lang.String |
fixQuery(java.lang.String query,
IDataSourceResultRow resultRow) |
IDataSourceResultSet |
getQueryResults(java.lang.String query,
java.lang.String tagType_)
Given a select statement.
|
java.lang.String |
getValueFromKey(java.lang.Object o) |
boolean |
isValidQuery(java.lang.String query) |
boolean |
isValidSet(java.lang.Object value) |
java.lang.Object |
resultSetToString(java.lang.String query) |
java.util.Iterator |
selectNodes(IDataSourceResultSet resultSet) |
java.lang.String |
substituteVariables(java.lang.String[] queryParts,
java.lang.Object[] toInsert,
java.lang.String query,
java.util.List<VarResults> parameters)
Called by the AbstractDataSource to substitute values into a select statement.
|
java.lang.String |
valueToString(java.lang.Object object)
Called by AbstractDataSource to return string value of obj returned from getValue(tag, stack) method.
|
public JsonQueryHelper(java.io.InputStream stream, java.lang.String encoding, JsonDataSource dsp) throws DataConnectionException
DataConnectionException
public IDataSourceResultSet getQueryResults(java.lang.String query, java.lang.String tagType_) throws DataSourceException
getQueryResults
in interface IDataSourceQueryHelper
query
- DataSourceException
public java.lang.String substituteVariables(java.lang.String[] queryParts, java.lang.Object[] toInsert, java.lang.String query, java.util.List<VarResults> parameters) throws DataSourceException
This function then returns: SELECT Id FROM Accounts WHERE name = 'Frank'
substituteVariables
in interface IDataSourceQueryHelper
queryParts
- - The query string broken up into parts such that between each element, an element
of toInsert is inserted (possibly with formatting).toInsert
- - The array of items to insert. toInsert.length is equal to (queryParts.length - 2)query
- parameters
- DataSourceException
public java.lang.String valueToString(java.lang.Object object) throws DataSourceException
valueToString
in interface IDataSourceQueryHelper
object
- returned from getValue() call in AbstractDataSourceDataSourceException
public java.util.Iterator selectNodes(IDataSourceResultSet resultSet)
selectNodes
in interface IDataSourceQueryHelper
resultSet
- public boolean isValidSet(java.lang.Object value)
isValidSet
in interface IDataSourceQueryHelper
public java.lang.String getValueFromKey(java.lang.Object o)
getValueFromKey
in interface IDataSourceQueryHelper
public boolean isValidQuery(java.lang.String query)
isValidQuery
in interface IDataSourceQueryHelper
public java.lang.String fixQuery(java.lang.String query, IDataSourceResultRow resultRow)
fixQuery
in interface IDataSourceQueryHelper
public java.lang.Object resultSetToString(java.lang.String query)
resultSetToString
in interface IDataSourceQueryHelper
public JsonResultSet createJsonResultSet(java.util.List resultList, java.util.List pathList, java.lang.String query, java.lang.String tagType)
public JsonResultSet createJsonResultSet(java.util.List<<any>> records, java.lang.String query, java.lang.String tagType)
Copyright © 2017 Windward Reports - All Rights Reserved. We are java reporting software