public abstract class AbstractDataSource extends DataSourceBase implements DataSourceProvider
| Modifier and Type | Field and Description |
|---|---|
AbstractDataSourceNode |
rootNode |
NAME_DATASET, NAME_JSON, NAME_LITERAL, NAME_ODATA, NAME_SFDC, NAME_SQL, NAME_XML, NAME_XML_1_0| Constructor and Description |
|---|
AbstractDataSource()
Create the datasource object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
approveDenyModifySelect(BaseTag xmlTag)
Verifys that a tag select is approved by a user defined callback
Or denies by throwing a DatasourceException or modifies the select
|
abstract void |
close()
Clean up resources.
|
abstract java.lang.String |
combineQueryForDataSet(java.lang.String dataSetQuery,
java.lang.String query,
java.lang.String dataSetName) |
DataSourceNode |
dataSourceNodeWithIndex(int index,
DataSourceIterator it,
ForEachTag tag)
Return the node when a forEach has a step > 1 and therefore results can be accessed using ${var[2]}.
|
java.util.Map<java.lang.String,java.lang.Object> |
getParameters()
This call is for internal engine use only.
|
int |
getParamMode()
Get the parameter substitution mode.
|
abstract IDataSourceQueryHelper |
getQueryHelper()
Returns the query helper which is datasource specific.
|
abstract int |
getQueryMode(java.lang.String query,
BaseTag tag)
Gets the query mode of a select.
|
DataSourceNode |
getRootNode()
Returns the root node for this data set.
|
TagAttributes[] |
getTagAttributes()
Returns the allowed attributes for all tags.
|
void |
populateDatasourceException(DataSourceException exception,
BaseTag tag,
DataSourceNode[] stack)
Populates that properties in a DataSourceException via DataSourceException.setProperties().
|
java.lang.Object |
returnValue(IDataSourceResultRow resultRow,
java.lang.String tagType)
Return the requested value from a result set.
|
void |
SetDseProps(DataSourceException dse,
BaseTag tag,
DataSourceNode[] stack) |
void |
setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
This call is for internal engine use only.
|
void |
setParamMode(int paramMode)
Set the parameter substitution mode.
|
void |
validateTag(BaseTag xmlTag)
Verifys that a tag has all required attributes and no unknown attributes.
|
convertToInputStream, lookupVariable, supportsDataSetsequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDatasourceNamepublic AbstractDataSourceNode rootNode
public abstract IDataSourceQueryHelper getQueryHelper()
public abstract void close()
throws DataSourceException
close in interface DataSourceProviderDataSourceException - Could not retrieve the data. Generally wraps a SqlException or XpathException.public abstract java.lang.String combineQueryForDataSet(java.lang.String dataSetQuery,
java.lang.String query,
java.lang.String dataSetName)
public abstract int getQueryMode(java.lang.String query,
BaseTag tag)
getQueryMode in interface DataSourceProviderquery - The query we need to return the mode fortag - The tag this select is for. This may be null.public DataSourceNode getRootNode()
getRootNode in interface DataSourceProviderpublic int getParamMode()
getParamMode in interface DataSourceProviderpublic void setParamMode(int paramMode)
setParamMode in interface DataSourceProviderparamMode - the parameter substitution mode.public java.util.Map<java.lang.String,java.lang.Object> getParameters()
getParameters in interface DataSourceProviderpublic void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
setParameters in interface DataSourceProviderparameters - This object is directly assigned for use as it is shared. Therefore any changes to it after
this call effect the datasource.public void validateTag(BaseTag xmlTag)
throws TagException
validateTag in interface DataSourceProviderxmlTag - The tag to checkTagException - thrown if illegal parameters passed in.public void approveDenyModifySelect(BaseTag xmlTag)
throws DataSourceException
approveDenyModifySelect in interface DataSourceProviderxmlTag - The tag to checkDataSourceException - thrown if illegal parameters passed in.public TagAttributes[] getTagAttributes()
getTagAttributes in interface DataSourceProviderpublic void SetDseProps(DataSourceException dse, BaseTag tag, DataSourceNode[] stack)
public void populateDatasourceException(DataSourceException exception, BaseTag tag, DataSourceNode[] stack)
populateDatasourceException in interface DataSourceProviderexception - The exception to populate.tag - The tag we're processing. null if no tag.stack - The node stack at the time of the exception. null if not relevant.public DataSourceNode dataSourceNodeWithIndex(int index, DataSourceIterator it, ForEachTag tag) throws DataSourceException
index - The index from the first row of the block returned. 0 is the same as not indexing.it - The iterator holding the result set presently on.tag - The forEach tag this is for.DataSourceExceptionpublic java.lang.Object returnValue(IDataSourceResultRow resultRow, java.lang.String tagType) throws DataSourceException
resultRow - The row from the results to pull the column value from.tagType - The tag this is for. Can be null.DataSourceExceptionCopyright © 2017 Windward Reports - All Rights Reserved. We are java reporting software