|
|||||||||||
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 String |
DELTA_PREFIX
Delta store table prefix |
static 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(String table)
Check whether DML operations are allowed on the specified table. |
void |
commit()
Commit the last transactions |
void |
deleteEntry(Entry entry,
SearchCriteria search)
Deletes an existing entry. |
void |
dropPesTable(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. |
String |
getAttrName(Entry entry)
Returns Attr name if not keyAttribute |
String |
getCreateTable(String driver)
|
Entry |
getNextEntry()
Returns the next entry from the result set created by selectEntries |
String |
getUniqueKey(Entry e,
Vector<String> keys)
Generate unique key from list of key Attributes |
String |
getVersion()
Return version information |
String |
getWhereClause(SearchCriteria search,
boolean ps)
Creates where clause for SQL statement |
void |
initialize(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. |
Object |
querySchema(Object table)
This function translates to whatever means a connector has to discover schema for a connection. |
Vector<String> |
queryTables()
Method returns list of table names |
void |
rollback()
Rollback the last transactions since the last commit |
void |
saveMetaData(ResultSetMetaData md)
Saves the Meta Data info |
void |
selectEntries()
Prepares for getNextEntry(). |
boolean |
setCommitMode(String mode)
Set the commit behavior of this PES Connector. |
void |
setEOCFlag(boolean flag)
Sets the value for EOC reached |
void |
setResultSet(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 String DELTA_PREFIX
public static final String PS_PREFIX
Constructor Detail |
---|
public PESConnector()
Method Detail |
---|
public void initialize(Object p1) throws Exception
initialize
in interface ConnectorInterface
initialize
in class Connector
p1
- Entry object
Exception
- Thrown if error occurs during initializationpublic void terminate()
terminate
in interface ConnectorInterface
terminate
in class Connector
public void dropPesTable(String table)
table
- Table Namepublic void setSelectionMode(int mode)
mode
- mode to be setpublic boolean chkforDML(String table)
table
- Table Name
public String getUniqueKey(Entry e, Vector<String> keys)
e
- Entry objectkeys
- List of keys
public String getAttrName(Entry entry)
entry
- Entry object
public void putEntry(Entry entry) throws Exception
putEntry
in interface ConnectorInterface
putEntry
in class Connector
entry
- The entry object
Exception
- Any exceptions thrown by the connector's underlying
classespublic void modEntry(Entry entry, SearchCriteria search, Entry old) throws 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.
Exception
- If no distinguished record is found in the System Store.public void modEntry(Entry entry, SearchCriteria search) throws Exception
modEntry
in interface ConnectorInterface
modEntry
in class Connector
entry
- The entry datasearch
- The search criteria used to locate the entry to be modified
Exception
- Any exceptions thrown by the connector's underlying
classespublic Entry findEntry(SearchCriteria search) throws Exception
findEntry
in interface ConnectorInterface
findEntry
in class Connector
search
- The search criteria used to locate the entry to be modified *
Exception
- derived from the connector's underlying classespublic Entry findEntryWithFlag(SearchCriteria search, boolean returnWrappedEntry) throws Exception
search
- search criteriareturnWrappedEntry
- type of the returned entry
Entry
object
Exception
- if an error occurspublic void deleteEntry(Entry entry, SearchCriteria search) throws Exception
deleteEntry
in interface ConnectorInterface
deleteEntry
in class Connector
entry
- The entry datasearch
- The search criteria used to locate the entry to be modified
Exception
- derived from the connector's underlying classespublic void selectEntries() throws Exception
selectEntries
in interface ConnectorInterface
selectEntries
in class Connector
Exception
- Any exceptions thrown by the connector's underlying
classesgetNextEntry()
public Entry getNextEntry() throws Exception
getNextEntry
in interface ConnectorInterface
getNextEntry
in class Connector
Exception
- Exception thrown during database operationsConnectorInterface.selectEntries()
public String getWhereClause(SearchCriteria search, boolean ps) throws Exception
search
- SearchCriteriaps
- Boolean which determines if is a prepared statement.
Exception
- Any exceptions thrown by the connector's underlying classespublic void saveMetaData(ResultSetMetaData md) throws SQLException
md
- ResultSetMetaData
SQLException
- Any exceptions thrown by the connector's underlying classespublic Object querySchema(Object table) throws 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
Exception
- if an error while retrieving the schema occurs.Entry
,
Vector
public void setResultSet(ResultSet rs) throws Exception
rs
- The new resultSet value
Exception
- Any exceptions thrown by the connector's underlying
classespublic void commit() throws SQLException
SQLException
- Any exceptions thrown by the connector's underlying
classespublic void rollback() throws SQLException
SQLException
- Thrown if an error occurscommit()
,
setCommitMode(java.lang.String)
public boolean setCommitMode(String mode)
mode
- The intended behavior. Possible values are:
commit()
public String getCreateTable(String driver)
driver
- java class name of the JDBC driver
driver
is knownpublic Vector<String> queryTables() throws Exception
queryTables
in class Connector
Exception
- Any exceptions thrown by the connector's underlying
classesVector
public 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 |