|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.PESConnector
public class PESConnector
The PES Connector provides access to the underlying System Store. The primary use of the System Store Connector/PES Connector is to store Entry objects into the System Store tables.
Field Summary | |
---|---|
static java.lang.String |
DELTA_PREFIX
Delta store table prefix |
static java.lang.String |
PS_PREFIX
Property store table prefix |
static int |
READ_ALL
specifies read all selection mode |
static int |
READ_DELETED
specifies read deleted selection mode |
static int |
READ_EXISTING
specifies read existing selection mode |
Fields inherited from class com.ibm.di.connector.Connector |
---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
Constructor Summary | |
---|---|
PESConnector()
Constructor |
Method Summary | |||||||||
---|---|---|---|---|---|---|---|---|---|
boolean |
chkforDML(java.lang.String table)
Check whether DML operations are aloowed on the specified table. |
||||||||
void |
commit()
Commit the last transactions |
||||||||
void |
deleteEntry(Entry entry,
SearchCriteria search)
Deletes an existing entry. |
||||||||
void |
dropPesTable(java.lang.String table)
Drop table of given name |
||||||||
Entry |
findEntry(SearchCriteria search)
Finds an existing entry. |
||||||||
Entry |
findEntryWithFlag(SearchCriteria search,
boolean returnWrappedEntry)
Wrapped functionality for backward compatibility. |
||||||||
java.lang.String |
getAttrName(Entry entry)
Returns Attr name if not keyAttribute |
||||||||
java.lang.String |
getCreateTable(java.lang.String db)
Returns CreateStatement |
||||||||
Entry |
getNextEntry()
Returns the next entry from the result set created by selectEntries |
||||||||
java.lang.String |
getUniqueKey(Entry e,
java.util.Vector<java.lang.String> keys)
Generate unique key from list of key Attributes |
||||||||
java.lang.String |
getVersion()
Return version information |
||||||||
java.lang.String |
getWhereClause(SearchCriteria search,
boolean ps)
Creates where clause for SQL statement |
||||||||
void |
initialize(java.lang.Object p1)
Method initializes the connector |
||||||||
boolean |
isEOCFlag()
Is end of cycle reached |
||||||||
void |
modEntry(Entry entry,
SearchCriteria search)
Modifies an existing entry. |
||||||||
void |
modEntry(Entry entry,
SearchCriteria search,
Entry old)
Modify the entry in the System Store. |
||||||||
void |
putEntry(Entry entry)
Adds a new entry. |
||||||||
java.lang.Object |
querySchema(java.lang.Object table)
This function translates to whatever means a connector has to discover schema for a connection. The connector may implement this, in which case a Vector of Entry objects is returned for each column/attribute it discovered. For a database connector this would typically be column names and their attributes. Each Entry in the Vector returned should contain the following attributes:
|
||||||||
java.util.Vector<java.lang.String> |
queryTables()
Method returns list of table names |
||||||||
void |
rollback()
Rollback the last transactions since the last commit |
||||||||
void |
saveMetaData(java.sql.ResultSetMetaData md)
Saves the Meta Data info |
||||||||
void |
selectEntries()
Prepares for getNextEntry(). |
||||||||
boolean |
setCommitMode(java.lang.String mode)
Set the commit behavior of this PES Connector. |
||||||||
void |
setEOCFlag(boolean flag)
Sets the value for EOC reached |
||||||||
void |
setResultSet(java.sql.ResultSet rs)
Instructs this connector to use the provided result set instead of its own. |
||||||||
void |
setSelectionMode(int mode)
Set selection mode |
||||||||
void |
terminate()
Terminate the connector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
---|
getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, pushback, queryOperations, queryReply, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer |
Field Detail |
---|
public static final int READ_EXISTING
public static final int READ_ALL
public static final int READ_DELETED
public static final java.lang.String DELTA_PREFIX
public static final java.lang.String PS_PREFIX
Constructor Detail |
---|
public PESConnector()
Method Detail |
---|
public void initialize(java.lang.Object p1) throws java.lang.Exception
initialize
in interface ConnectorInterface
initialize
in class Connector
p1
- Entry object
java.lang.Exception
- Thrown if error occurs during initializationpublic void terminate()
terminate
in interface ConnectorInterface
terminate
in class Connector
public void dropPesTable(java.lang.String table)
table
- Table Namepublic void setSelectionMode(int mode)
mode
- mode to be setpublic boolean chkforDML(java.lang.String table)
table
- Table Name
public java.lang.String getUniqueKey(Entry e, java.util.Vector<java.lang.String> keys)
e
- Entry objectkeys
- List of keys
public java.lang.String getAttrName(Entry entry)
entry
- Entry object
public void putEntry(Entry entry) throws java.lang.Exception
putEntry
in interface ConnectorInterface
putEntry
in class Connector
entry
- The entry object
java.lang.Exception
- Any exceptions thrown by the connector's underlying
classespublic void modEntry(Entry entry, SearchCriteria search, Entry old) throws java.lang.Exception
modEntry
in interface ConnectorInterface
modEntry
in class Connector
entry
- An Entry containing the new values to be set in the System
Store.search
- Search Criteria used for updating the specific record in the
System Store.old
- The old values persisted in the System Store.
java.lang.Exception
- If no distinguished record is found in the System Store.public void modEntry(Entry entry, SearchCriteria search) throws java.lang.Exception
modEntry
in interface ConnectorInterface
modEntry
in class Connector
entry
- The entry datasearch
- The search criteria used to locate the entry to be modified
java.lang.Exception
- Any exceptions thrown by the connector's underlying
classespublic Entry findEntry(SearchCriteria search) throws java.lang.Exception
findEntry
in interface ConnectorInterface
findEntry
in class Connector
search
- The search criteria used to locate the entry to be modified *
java.lang.Exception
- derived from the connector's underlying classespublic Entry findEntryWithFlag(SearchCriteria search, boolean returnWrappedEntry) throws java.lang.Exception
search
- search criteriareturnWrappedEntry
- type of the returned entry
Entry
object
java.lang.Exception
- if an error occurspublic void deleteEntry(Entry entry, SearchCriteria search) throws java.lang.Exception
deleteEntry
in interface ConnectorInterface
deleteEntry
in class Connector
entry
- The entry datasearch
- The search criteria used to locate the entry to be modified
java.lang.Exception
- derived from the connector's underlying classespublic void selectEntries() throws java.lang.Exception
selectEntries
in interface ConnectorInterface
selectEntries
in class Connector
java.lang.Exception
- Any exceptions thrown by the connector's underlying
classesgetNextEntry()
public Entry getNextEntry() throws java.lang.Exception
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
java.lang.Exception
- Exception thrown during database operationsConnectorInterface.selectEntries()
public java.lang.String getWhereClause(SearchCriteria search, boolean ps) throws java.lang.Exception
search
- SearchCriteriaps
- Boolean which determines if is a prepared statement.
java.lang.Exception
- Any exceptions thrown by the connector's underlying classespublic void saveMetaData(java.sql.ResultSetMetaData md) throws java.sql.SQLException
md
- ResultSetMetaData
java.sql.SQLException
- Any exceptions thrown by the connector's underlying classespublic java.lang.Object querySchema(java.lang.Object table) throws java.lang.Exception
Each Entry in the Vector returned should contain the following attributes:
Name | Value |
---|---|
name | The name of the column/attribute/field .... |
syntax | The syntax or expected value type |
size | If specified this will give the user a hint as to how long the field may be |
querySchema
in interface ConnectorInterface
querySchema
in class Connector
table
- The object on which to discover schema. This may be an Entry
or a string value
java.lang.Exception
- if an error while retrieving the schema occurs.Entry
,
Vector
public void setResultSet(java.sql.ResultSet rs) throws java.lang.Exception
rs
- The new resultSet value
java.lang.Exception
- Any exceptions thrown by the connector's underlying
classespublic void commit() throws java.sql.SQLException
java.sql.SQLException
- Any exceptions thrown by the connector's underlying
classespublic void rollback() throws java.sql.SQLException
java.sql.SQLException
- Thrown if an error occurscommit()
,
setCommitMode(java.lang.String)
public boolean setCommitMode(java.lang.String mode)
mode
- The intended behavior. Possible values are:
commit()
public java.lang.String getCreateTable(java.lang.String db)
db
- Type of DataBase used
public java.util.Vector<java.lang.String> queryTables() throws java.lang.Exception
queryTables
in class Connector
java.lang.Exception
- Any exceptions thrown by the connector's underlying
classesVector
public java.lang.String getVersion()
getVersion
in interface VersionInfoInterface
public boolean isEOCFlag()
public void setEOCFlag(boolean flag)
flag
- true , if EOC is reached, false otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |