public class IlvJDBCDataSource extends IlvDiagrammerDataSource
A JDBC data source reads data into a diagram component from a database.
A JDBC data source is defined by a set of queries. Each query is a table read from a database which returns a set of nodes or links.
Modifier and Type | Class and Description |
---|---|
static class |
IlvJDBCDataSource.QueryParameters
This class is used to store the parameters of a query
for a Diagrammer JDBC data source.
|
Constructor and Description |
---|
IlvJDBCDataSource()
Creates a new
IlvJDBCDataSource . |
Modifier and Type | Method and Description |
---|---|
void |
addQuery(IlvJDBCDataSource.QueryParameters query)
Adds a query to this data source.
|
protected void |
deserializeImpl(Element element)
Deserializes the parameters of this data source from the specified DOM element.
|
String |
getDescription()
Returns the URL used to connect to the database.
|
Collection |
getQueries()
Returns the queries of this data source.
|
void |
read(IlvDiagrammer diagrammer)
Executes the database queries and sends the resulting data to the diagram
component for rendering.
|
void |
removeAllQueries()
Removes all the queries from this data source.
|
void |
removeQuery(IlvJDBCDataSource.QueryParameters query)
Removes a query from this data source.
|
protected void |
serializeImpl(Element element)
Serializes the parameters of this data source to the specified DOM element.
|
void |
write(IlvDiagrammer diagrammer)
Throws an exception because JDBC data sources do not support writing.
|
deserialize, getBaseURL, serialize, supportsWrite
public void addQuery(IlvJDBCDataSource.QueryParameters query)
IlvJDBCDataSource.QueryParameters
.query
- The query to add to this data source.public void removeQuery(IlvJDBCDataSource.QueryParameters query)
IlvJDBCDataSource.QueryParameters
.query
- The query to remove from this data source.public Collection getQueries()
IlvJDBCDataSource.QueryParameters
.public void removeAllQueries()
public void read(IlvDiagrammer diagrammer) throws IlvDiagrammerException
read
in class IlvDiagrammerDataSource
diagrammer
- The diagram component that will display the data read from this data source.IlvDiagrammerException
- If an exception occurs while reading data. This exception
will usually contain a "cause", that is, the original
low-level exception that caused the data source to
fail to complete the operation.public void write(IlvDiagrammer diagrammer) throws IlvDiagrammerException
write
in class IlvDiagrammerDataSource
diagrammer
- The diagram component that contains the data to be saved to the data source.IlvDiagrammerException
- If an exception occurs while writing data. This exception
will usually contain a "cause", that is to say the original
low-level exception that caused the data source to
fail to complete the operation.public String getDescription()
getDescription
in class IlvDiagrammerDataSource
protected void serializeImpl(Element element) throws IlvDiagrammerException
serializeImpl
in class IlvDiagrammerDataSource
element
- The DOM element to which the data source parameters are written.IlvDiagrammerException
- If an exception occurs while serializing the data source.protected void deserializeImpl(Element element) throws IlvDiagrammerException
deserializeImpl
in class IlvDiagrammerDataSource
element
- The DOM element to which the data source parameters are written.IlvDiagrammerException
- If an exception occurs while deserializing the data source.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.