public abstract class AbstractDataSource extends DataSourceBase implements DataSourceProvider
Modifier and Type | Class and Description |
---|---|
class |
AbstractDataSource.AbstractDataSourceNode |
Modifier and Type | Field and Description |
---|---|
AbstractDataSource.AbstractDataSourceNode |
rootNode |
int |
SynTaxmode |
Constructor and Description |
---|
AbstractDataSource() |
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.
|
java.util.Map |
getMap()
Returns the map of variables for this datasource.
|
int |
getParamMode()
Get the parameter substitution mode.
|
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 |
returnfirstattribute(DataSourceResultRow dsrr) |
java.lang.Object |
returnValue(DataSourceResultRow dsrr) |
void |
setDatasets(java.lang.Object[] datasets)
Set the datasets to use with this datasource.
|
void |
setMap(java.util.Map m)
Adds a map that is used for ${variable} substitution.
|
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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDatasourceName
public AbstractDataSource.AbstractDataSourceNode rootNode
public int SynTaxmode
public abstract void close()
close
in interface DataSourceProvider
public abstract int getQueryMode(java.lang.String query, BaseTag tag) throws DataSourceException
getQueryMode
in interface DataSourceProvider
query
- tag
- The tag this select is for. This may be null.DataSourceException
public DataSourceNode getRootNode()
DataSourceProvider
getRootNode
in interface DataSourceProvider
public void setParamMode(int paramMode)
DataSourceProvider
setParamMode
in interface DataSourceProvider
paramMode
- the parameter substitution mode.public int getParamMode()
DataSourceProvider
getParamMode
in interface DataSourceProvider
public java.util.Map getMap()
DataSourceProvider
getMap
in interface DataSourceProvider
public void validateTag(BaseTag xmlTag) throws TagException
DataSourceProvider
validateTag
in interface DataSourceProvider
xmlTag
- The tag to checkTagException
- thrown if illegal parameters passed in.public void approveDenyModifySelect(BaseTag xmlTag) throws DataSourceException
approveDenyModifySelect
in interface DataSourceProvider
xmlTag
- The tag to checkDataSourceException
- thrown if illegal parameters passed in.public void setMap(java.util.Map m)
DataSourceProvider
setMap
in interface DataSourceProvider
m
- The map of string pairs.public void setDatasets(java.lang.Object[] datasets)
DataSourceProvider
setDatasets
in interface DataSourceProvider
datasets
- The datasets to use. Can be null to turn off datasets. This is a DatasetBase[] but because of
how the .NET engine is structured, we need to declare it as an object.public TagAttributes[] getTagAttributes()
DataSourceProvider
getTagAttributes
in interface DataSourceProvider
public void populateDatasourceException(DataSourceException exception, BaseTag tag, DataSourceNode[] stack)
populateDatasourceException
in interface DataSourceProvider
exception
- 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 java.lang.Object returnfirstattribute(DataSourceResultRow dsrr) throws DataSourceException
DataSourceException
public java.lang.Object returnValue(DataSourceResultRow dsrr) throws DataSourceException
DataSourceException
Copyright © 2017 Windward Reports - All Rights Reserved. We are java reporting software