JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart.data
Class JDBCDataSource

java.lang.Object
  |
  +--com.klg.jclass.chart.ChartDataSupport
        |
        +--com.klg.jclass.chart.data.BaseDataSource
              |
              +--com.klg.jclass.chart.data.JCDefaultDataSource
                    |
                    +--com.klg.jclass.chart.data.JDBCDataSource
All Implemented Interfaces:
ChartDataManageable, ChartDataManager, ChartDataModel, HoleValueChartDataModel, com.klg.jclass.chart.ImageMapChartDataModel, LabelledChartDataModel, Serializable

public class JDBCDataSource
extends JCDefaultDataSource

JDBCDataSource extends JCDefaultDataSource to create a data source for use with JDBC.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.klg.jclass.chart.data.JCDefaultDataSource
defaultY, suppressMultipleGeneration
 
Fields inherited from class com.klg.jclass.chart.data.BaseDataSource
cloneArrays, clusterImageMapInfo, holeValue, legendImageMapInfo, name, pointImageMapInfo, pointLabels, seriesImageMapInfo, seriesLabels, xvalues, yvalues
 
Fields inherited from class com.klg.jclass.chart.ChartDataSupport
source
 
Fields inherited from interface com.klg.jclass.chart.ChartDataModel
ALL
 
Constructor Summary
JDBCDataSource()
          Default constructor.
JDBCDataSource(Locale locale)
          Default constructor with locale.
JDBCDataSource(ResultSet jdbcData)
          The JDBCDataSource constructor takes a ResultSet as source data.
JDBCDataSource(ResultSet jdbcData, String xColumnName, String pointLabelColumnName, String[] activeColumnNames)
          The JDBCDataSource constructor takes a ResultSet as source data and column names to specify the columns to be used for data.
 
Method Summary
 void setData(ResultSet jdbcData, String xColumnName, String pointLabelColumnName, String[] activeColumnNames)
          Sets the data for this data source from the passed result set and according to the specification of columns in the passed name parameters.
protected  void setJDBCData(ResultSet jdbcData, String xColumnName, String pointLabelColumnName, String[] activeColumnNames)
          Internal method to Populate the datasource with data from the result set according to the specification of columns in the passed name parameters.
 
Methods inherited from class com.klg.jclass.chart.data.JCDefaultDataSource
buildDataSourceString, check, generateLabels, generateLabels, setClusterImageMapInfo, setClusterImageMapInfo, setData, setLegendImageMapInfo, setLegendImageMapInfo, setName, setPointImageMapInfo, setPointImageMapInfo, setPointImageMapInfo, setPointImageMapInfo, setPointLabels, setSeriesImageMapInfo, setSeriesImageMapInfo, setSeriesLabels, setXSeries, setYSeries, updateChart
 
Methods inherited from class com.klg.jclass.chart.data.BaseDataSource
cloneCheck, cloneCheck, cloneCheck, getChartDataManager, getCloneArrays, getClusterImageMapInfo, getDataSourceName, getHoleValue, getLegendImageMapInfo, getNumSeries, getPointImageMapInfo, getPointLabels, getSeriesImageMapInfo, getSeriesLabels, getXSeries, getYSeries, setCloneArrays
 
Methods inherited from class com.klg.jclass.chart.ChartDataSupport
addChartDataListener, fireChartDataEvent, fireChartDataEvent, removeChartDataListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCDataSource

public JDBCDataSource()
Default constructor.


JDBCDataSource

public JDBCDataSource(Locale locale)
Default constructor with locale.


JDBCDataSource

public JDBCDataSource(ResultSet jdbcData)
The JDBCDataSource constructor takes a ResultSet as source data. Default behavior is to use all numeric columns for Y data and automatically generate x values.

Parameters:
jdbcData - the input data as a ResultSet

JDBCDataSource

public JDBCDataSource(ResultSet jdbcData,
                      String xColumnName,
                      String pointLabelColumnName,
                      String[] activeColumnNames)
The JDBCDataSource constructor takes a ResultSet as source data and column names to specify the columns to be used for data.

Parameters:
jdbcData - ResultSet object to get data from.
xColumnName - the name of the column to use as x value data. if null, x values are generated automatically.
pointLabelColumnName - the name of the column to use for point label names. If null, point labels are generated automatically.
activeColumnNames - array of column names to use for y values. if null, all numeric columns not associated with the x column or the point labels column are used.
Method Detail

setData

public void setData(ResultSet jdbcData,
                    String xColumnName,
                    String pointLabelColumnName,
                    String[] activeColumnNames)
Sets the data for this data source from the passed result set and according to the specification of columns in the passed name parameters.

Parameters:
jdbcData - ResultSet object to get data from.
xColumnName - the name of the column to use as x value data. if null, x values are generated automatically.
pointLabelColumnName - the name of the column to use for point label names. If null, point labels are generated automatically.
activeColumnNames - array of column names to use for y values. if null, all numeric columns not associated with the x column or the point labels column are used.

setJDBCData

protected void setJDBCData(ResultSet jdbcData,
                           String xColumnName,
                           String pointLabelColumnName,
                           String[] activeColumnNames)
Internal method to Populate the datasource with data from the result set according to the specification of columns in the passed name parameters. Series labels are the column labels of the active columns.

Parameters:
jdbcData - ResultSet object to get data from.
xColumnName - the name of the column to use as x value data. if null, x values are generated automatically.
pointLabelColumnName - the name of the column to use for point label names. If null, point labels are generated automatically.
activeColumnNames - array of column names to use for y values. if null, all numeric columns not associated with the x column or the point labels column are used.

Copyright © 2004 Quest Software Inc..
All rights reserved.