public class JdbcAccessor extends RecordAccessor
| Constructor and Description |
|---|
JdbcAccessor()
Create a new JdbcAccessor.
|
JdbcAccessor(java.sql.Connection connection)
Create a new JdbcAccessor using the given connection
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
extendGraph(java.lang.String graphName,
Graph<DataRecord,DataRecord> graph,
DataRecord node)
Extend the given graph around the specified node.
|
boolean |
extendTree(java.lang.String treeName,
Tree<DataRecord> tree,
DataRecord node)
Extend the given tree around the specified node.
|
protected java.util.Set<DataRecord> |
retrieveRecords(DataTemplate template)
Retrieve a set of data records for a particular DataTemplate.
|
void |
setConnection(java.sql.Connection connection)
Set the connection used by this JdbcAccessor
|
void |
setInitParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Set any initialization parameters required by this data accessor.
|
void |
setQuery(java.lang.String queryString)
Set the query string used to retrieve records.
|
addFieldHandler, addToGraph, addToTree, createReferenceNode, getDataset, getFieldHandler, getGraph, getGrid, getMaxRecords, getReasoner, getStructureReasoners, getTree, setMaxRecords, setReasoner, setReasoneraddStructure, addTemplate, getDatasetNames, getGraphNames, getGridNames, getSpec, getStructureType, getTemplate, getTemplateNames, getTreeNames, setConfig, setConfigFile, setConfigFilepublic JdbcAccessor()
public JdbcAccessor(java.sql.Connection connection)
connection - the connection for the JSQL queriespublic boolean extendGraph(java.lang.String graphName,
Graph<DataRecord,DataRecord> graph,
DataRecord node)
extendGraph in interface DataAccessor<DataRecord,DataRecord>extendGraph in class RecordAccessorgraphName - The name of the graphgraph - The graph to extendnode - The node to use as an extension point.public boolean extendTree(java.lang.String treeName,
Tree<DataRecord> tree,
DataRecord node)
extendTree in interface DataAccessor<DataRecord,DataRecord>extendTree in class RecordAccessortreeName - The name of the graphtree - The graph to extendnode - The node to use as an extension point.protected java.util.Set<DataRecord> retrieveRecords(DataTemplate template)
retrieveRecords in class RecordAccessortemplate - The data template specifying field mappings and
descriptionsjava.lang.IllegalStateException - if the connection has not been set.public void setConnection(java.sql.Connection connection)
connection - the connection for the JSQL queriespublic void setInitParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
dbDriver, dbUrl,
dbUser and dbPass.parameters - a map of initialization parameterspublic void setQuery(java.lang.String queryString)
setQuery in class AbstractDataAccessor<DataRecord,DataRecord>queryString - the query string