|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.AbleObject
com.ibm.able.beans.AbleAbstractImport
com.ibm.able.beans.AbleDBImport
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.
| Field Summary | |
|---|---|
protected java.sql.Connection |
connection
The SQL connection. |
static java.lang.String |
defaultName
Value assigned to name by default. |
protected java.lang.String |
schema
A String specifying the schema cpntaining the table to read. |
protected java.lang.String |
schemaSeparator
|
protected java.lang.String |
selectionColumns
A comma-delimited String of names of columns to include in the selection. |
protected java.lang.String |
selectionWhere
A String in the query as the clause immediately after the word "WHERE". |
protected java.lang.String |
table
A String specifying the table to read. |
| 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, properties, 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. |
|
| Method Summary | |
|---|---|
void |
close()
Override the superclass Close so that the connection is closed before calling super.close(). |
java.sql.Connection |
getConnection()
|
java.lang.String |
getConnectionOptions()
|
java.lang.String |
getDatabase()
|
java.lang.String |
getDriver()
|
java.lang.String |
getProtocol()
|
java.lang.String |
getProtocolURL()
|
java.lang.String |
getSchema()
|
java.lang.String |
getSchemaTable()
Method getSchemaTable. |
java.lang.String |
getSelectionColumns()
|
java.lang.String |
getSelectionWhere()
|
java.lang.String |
getSubprotocol()
|
java.lang.String |
getTable()
|
java.lang.String |
getUserid()
|
void |
init()
Overrides the superclass init so that a connection is created before running the superclass init. |
void |
open()
Open the table specfied by connection and statement. |
void |
setConnectionOptions(java.lang.String options)
|
void |
setDatabase(java.lang.String database)
|
void |
setDriver(java.lang.String driver)
|
void |
setPassword(java.lang.String password)
|
void |
setProtocol(java.lang.String protocol)
|
void |
setProtocolURL(java.lang.String url)
|
void |
setSchema(java.lang.String schema)
|
void |
setSelectionColumns(java.lang.String selectionColumns)
|
void |
setSelectionWhere(java.lang.String selectionWhere)
|
void |
setSubprotocol(java.lang.String subprotocol)
|
void |
setTable(java.lang.String table)
|
void |
setUserid(java.lang.String userid)
|
java.lang.String |
toString()
return a formatted string describing the state of this DataSet |
protected void |
updateFieldUsage(java.util.Vector oldFieldList)
Copy the usage for one field from the old field to the new so that an open does not wipe this data out. |
| 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, getProperties, getProperty, getState, getTraceLogger, init, isChanged, process, removeAllConnections, removeProperty, resumeAll, setChanged, setComment, setLogger, setName, setParent, setProperties, setProperty, setState, setTraceLogger, suspendAll |
| Methods inherited from interface com.ibm.able.AbleEventListener |
|---|
handleAbleEvent |
| Methods inherited from interface com.ibm.able.AbleEventListenerManager |
|---|
addAbleEventListener, dataChanged, getAbleEventListeners, notifyAbleEventListeners, removeAbleEventListener |
| Methods inherited from interface com.ibm.able.AbleEventQueueProcessor |
|---|
processNoEventProcessingEnabledSituation |
| Methods inherited from interface com.ibm.able.AblePropertyChangeManager |
|---|
addPropertyChangeListener, addPropertyConnection, getPropertyChangeListeners, getPropertyConnectionManager, removeAllPropertyConnections, removePropertyChangeListener, removePropertyConnection |
| Methods inherited from interface com.ibm.able.AbleSerializable |
|---|
getFileName, restoreFromFile, restoreFromFile, saveToFile, saveToFile, setFileName |
| Field Detail |
public static final java.lang.String defaultName
protected java.lang.String schema
protected java.lang.String table
protected transient java.sql.Connection connection
protected java.lang.String selectionColumns
protected java.lang.String selectionWhere
protected java.lang.String schemaSeparator
| Constructor Detail |
public AbleDBImport()
throws AbleException
public AbleDBImport(java.lang.String name)
throws AbleException
name - A String containing the name used to identify this bean.| Method Detail |
public void open()
throws AbleException
open in class AbleAbstractImportAbleExceptionAbleAbstractImport.open()protected void updateFieldUsage(java.util.Vector oldFieldList)
public void init()
throws AbleException
init in interface AbleBeaninit in class AbleAbstractImportAbleExceptionAbleAbstractImport.init()public java.lang.String getSchemaTable()
public void close()
throws AbleException
close in class AbleAbstractImportAbleExceptionAbleAbstractImport.close()public java.lang.String toString()
public java.lang.String getDriver()
public void setDriver(java.lang.String driver)
public java.lang.String getProtocol()
public void setProtocol(java.lang.String protocol)
public java.lang.String getSubprotocol()
public void setSubprotocol(java.lang.String subprotocol)
public java.sql.Connection getConnection()
public java.lang.String getDatabase()
public void setDatabase(java.lang.String database)
public java.lang.String getConnectionOptions()
public void setConnectionOptions(java.lang.String options)
public java.lang.String getProtocolURL()
public void setProtocolURL(java.lang.String url)
public java.lang.String getUserid()
public void setUserid(java.lang.String userid)
public void setPassword(java.lang.String password)
public java.lang.String getSchema()
public void setSchema(java.lang.String schema)
public java.lang.String getTable()
public void setTable(java.lang.String table)
public java.lang.String getSelectionColumns()
public void setSelectionColumns(java.lang.String selectionColumns)
public java.lang.String getSelectionWhere()
public void setSelectionWhere(java.lang.String selectionWhere)
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||