com.ibm.able.beans
Class AbleDBImport
java.lang.Object
|
+--com.ibm.able.AbleObject
|
+--com.ibm.able.beans.AbleAbstractImport
|
+--com.ibm.able.beans.AbleDBImport
- All Implemented Interfaces:
- AbleBean, AbleDataBufferManager, AbleDataSource, AbleEventListener, AbleEventListenerManager, AbleEventQueueManager, AbleEventQueueProcessor, AblePropertyChangeManager, AbleSerializable, java.io.Serializable
- public class AbleDBImport
- extends AbleAbstractImport
- implements java.io.Serializable
This class provides Able beans with access to database data using JDBC
interfaces.
A DBImport will read data from a database table, and write its records to
a data outputbuffer. It knows how to create an AbleDBTable which is used
by the AbleAbstractImport superclass to handle I/O and cacheing.
The DBImport object requires SQL connection and table access information.
It builds a query in the following format:
SELECT * from SYSCAT.TABLES WHERE ( SYSCAT.TABLES.DEFINER like 'SYS%' )
Meta-data definition is used by the AbleDBTable to create Able field
variables and scan the source data, computing min/mean/max values for
continuous fields, creating symbol to index mappings for categorical fields,
and creating number to index mappings for discrete fields.
A DBImport can be used to generate an AbleFilter bean which will translate the
data in the manner specified in the meta-data definition. Mapping from SQL
data type to Able data type is performed by the AbleDBTable data member.
Field usage may be specified from the GUI Data property panel, or via API.
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
defaultName
Value assigned to name by default. |
Fields inherited from class com.ibm.able.beans.AbleAbstractImport |
bufferRecordIndex, bufferSize, computeStatistics, cycleRelative, cycleSize, eof, fieldList, importData, numEpochs, numericData, numFieldsPerRecord, numRecords, outNum, outSym, randomIndices, randomizeData, recordIndex, recordsRead, textData |
Fields inherited from class com.ibm.able.AbleObject |
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace |
Constructor Summary |
AbleDBImport()
Construct a default AbleDBImport object. |
AbleDBImport(java.lang.String name)
Construct an AbleDBImport object with a specified name. |
Methods inherited from class com.ibm.able.beans.AbleAbstractImport |
endOfFile, eof, getAgentFieldList, getBufferSize, getComputeStatistics, getCurrentRecordIndex, getCycleSize, getCycleSizeAsString, getFieldList, getFieldList, getNextRecordBlock, getNormalizedRecordSize, getNumberOfOutputFields, getNumEpochs, getNumRecords, getRecordsRead, getStepsPerCycle, isAllNumericData, isCycleRelative, isRandomizeData, isReady, process, processAbleEvent, processTimerEvent, quitAll, reset, setBufferSize, setComputeStatistics, setCycleSize, setDefaults, setFieldList, setRandomizeData |
Methods inherited from class com.ibm.able.AbleObject |
addAbleEventListener, addDestBufferConnection, addPropertyChangeListener, addPropertyConnection, addSourceBufferConnection, addStateChangeListener, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getComment, getDestBufferConnections, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getPropertyConnectionManager, getSleepTime, getSourceBufferConnections, getState, getTraceLogger, handleAbleEvent, hasInputBuffer, hasOutputBuffer, init, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, process, processBufferConnections, processNoEventProcessingEnabledSituation, quitEnabledEventProcessing, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllConnections, removeAllPropertyConnections, removeDestBufferConnection, removePropertyChangeListener, removePropertyConnection, removeSourceBufferConnection, removeStateChangeListener, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeAll, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setDataFlowEnabled, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setSleepTime, setState, setTimerEventProcessingEnabled, setTraceLogger, sourceConnectionsOK, startEnabledEventProcessing, suspendAll, suspendEnabledEventProcessing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.able.AbleBean |
getComment, getLogger, getName, getParent, getState, getTraceLogger, init, isChanged, process, removeAllConnections, resumeAll, setChanged, setComment, setLogger, setName, setParent, setState, setTraceLogger, suspendAll |
Methods inherited from interface com.ibm.able.AbleDataBufferManager |
addDestBufferConnection, addSourceBufferConnection, getDestBufferConnections, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getSourceBufferConnections, hasInputBuffer, hasOutputBuffer, isConnectable, isDataFlowEnabled, processBufferConnections, removeAllBufferConnections, removeDestBufferConnection, removeSourceBufferConnection, setDataFlowEnabled, setInputBuffer, setInputBuffer, setOutputBuffer, setOutputBuffer |
Methods inherited from interface com.ibm.able.AbleEventQueueManager |
flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isTimerEventProcessingEnabled, quitEnabledEventProcessing, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing |
defaultName
public static final java.lang.String defaultName
- Value assigned to name by default.
AbleDBImport
public AbleDBImport()
throws AbleException
- Construct a default AbleDBImport object.
AbleDBImport
public AbleDBImport(java.lang.String name)
throws AbleException
- Construct an AbleDBImport object with a specified name.
- Parameters:
name
- A String containing the name used to identify this bean.
open
public void open()
throws AbleException
- Open the table specfied by connection and statement.
Create an AbleDBTable object and load the data into memory.
Since SQL meta data does not contain Able field usage information,
preserve the usage setting when the table is opened and the fieldList
Vector is recreated so that fields with the same name have the same
usage before and after opening.
- Overrides:
open
in class AbleAbstractImport
- See Also:
AbleAbstractImport.open()
init
public void init()
throws AbleException
- Overrides the superclass init so that a connection is created before
running the superclass init.
- Overrides:
init
in class AbleAbstractImport
- See Also:
AbleAbstractImport.init()
close
public void close()
throws AbleException
- Override the superclass Close so that the connection is closed
before calling super.close().
- Overrides:
close
in class AbleAbstractImport
- See Also:
AbleAbstractImport.close()
toString
public java.lang.String toString()
- return a formatted string describing the state of this DataSet
- Overrides:
toString
in class java.lang.Object
getDriver
public java.lang.String getDriver()
setDriver
public void setDriver(java.lang.String driver)
getProtocol
public java.lang.String getProtocol()
setProtocol
public void setProtocol(java.lang.String protocol)
getSubprotocol
public java.lang.String getSubprotocol()
setSubprotocol
public void setSubprotocol(java.lang.String subprotocol)
getConnection
public java.sql.Connection getConnection()
getDatabase
public java.lang.String getDatabase()
setDatabase
public void setDatabase(java.lang.String database)
getProtocolURL
public java.lang.String getProtocolURL()
getUserid
public java.lang.String getUserid()
setUserid
public void setUserid(java.lang.String userid)
setPassword
public void setPassword(java.lang.String password)
getSchema
public java.lang.String getSchema()
setSchema
public void setSchema(java.lang.String schema)
getTable
public java.lang.String getTable()
setTable
public void setTable(java.lang.String table)
getSelectionColumns
public java.lang.String getSelectionColumns()
setSelectionColumns
public void setSelectionColumns(java.lang.String selectionColumns)
getSelectionWhere
public java.lang.String getSelectionWhere()
setSelectionWhere
public void setSelectionWhere(java.lang.String selectionWhere)
Copyright
public static java.lang.String Copyright()
- Determine the copyright of this class.
- Returns:
- A String containing this class's copyright statement.
(C) Copyright IBM Corporation 1999, 2003