com.ibm.di.connector
Class BTree

java.lang.Object
  extended by com.ibm.di.connector.Connector
      extended by com.ibm.di.connector.BTree
All Implemented Interfaces:
ConnectorInterface, VersionInfoInterface

public class BTree
extends Connector
implements ConnectorInterface


Field Summary
 boolean fastreplace
           
static int READ_ALL
           
static int READ_DELETED
           
static int READ_EXISTING
           
 
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
 
Constructor Summary
BTree()
           
 
Method Summary
 void deleteEntry(Entry entry, SearchCriteria search)
          Deletes an existing entry.
 Entry findEntry(SearchCriteria search)
          Finds an existing entry.
 DBFile getDatabase()
           
 Object getDBProperty(Object p1)
           
 Entry getNextEntry()
          Returns the next Entry from the connector.
 Object getProperty(Object p1)
          Return a connector property.
 String getVersion()
          Return version information
 void initialize(Object p1)
          Initialize the connector.
 void modEntry(Entry entry, SearchCriteria search)
          Modifies an existing entry.
 void putEntry(Entry entry)
          Adds a new entry to the data source
 void selectEntries()
          Prepare the Connector for sequential read.
 void setDBProperty(Object p1, Object p2)
           
 void setProperty(Object p1, Object p2)
          Set connector property.
 void setSelectionMode(int mode)
           
 void terminate()
          Terminate the connector.
 
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logmsg, modEntry, pushback, queryOperations, queryReply, querySchema, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setRSInterface, terminateServer
 
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, modEntry, pushback, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer
 

Field Detail

READ_EXISTING

public static final int READ_EXISTING
See Also:
Constant Field Values

READ_ALL

public static final int READ_ALL
See Also:
Constant Field Values

READ_DELETED

public static final int READ_DELETED
See Also:
Constant Field Values

fastreplace

public boolean fastreplace
Constructor Detail

BTree

public BTree()
Method Detail

initialize

public void initialize(Object p1)
                throws Exception
Description copied from class: Connector
Initialize the connector. The connector may be passed a parameter of any kind by the user. It is up to the connector to determine whether this object can be used or not. The parameter is typically provided by a user script. When an AssemblyLine initializes it's Connectors, they are passed a ConnectorMode object.

Specified by:
initialize in interface ConnectorInterface
Overrides:
initialize in class Connector
Parameters:
p1 - User provided parameter
Throws:
Exception

terminate

public void terminate()
Description copied from class: Connector
Terminate the connector. This function closes all connection and releases all resources used by the connector. This function also calls the parser's closeParser() method if a parser is active.

Specified by:
terminate in interface ConnectorInterface
Overrides:
terminate in class Connector

setSelectionMode

public void setSelectionMode(int mode)

selectEntries

public void selectEntries()
                   throws Exception
Description copied from class: Connector
Prepare the Connector for sequential read. If necessary, create a result set to be used for getNextEntry(). When the Connector is used as an Iterator in an AssemblyLine, this method will be called. Default is an empty method.

Specified by:
selectEntries in interface ConnectorInterface
Overrides:
selectEntries in class Connector
Throws:
Exception

getDBProperty

public Object getDBProperty(Object p1)
                     throws Exception
Throws:
Exception

setDBProperty

public void setDBProperty(Object p1,
                          Object p2)
                   throws Exception
Throws:
Exception

getNextEntry

public Entry getNextEntry()
                   throws Exception
Description copied from class: Connector
Returns the next Entry from the connector. The entry is populated with attributes and values from the next entry in the input set.

Specified by:
getNextEntry in interface ConnectorInterface
Overrides:
getNextEntry in class Connector
Returns:
- the next Entry, or null if no more data
Throws:
Exception
See Also:
Connector.selectEntries()

putEntry

public void putEntry(Entry entry)
              throws Exception
Description copied from class: Connector
Adds a new entry to the data source

Specified by:
putEntry in interface ConnectorInterface
Overrides:
putEntry in class Connector
Parameters:
entry - The entry data to add
Throws:
Exception - Any exceptions thrown by the connector's underlying classes

modEntry

public void modEntry(Entry entry,
                     SearchCriteria search)
              throws Exception
Description copied from class: Connector
Modifies an existing entry. The new entry data is given by the entry parameter and the search criteria specifies which entry to modify.

Specified by:
modEntry in interface ConnectorInterface
Overrides:
modEntry in class Connector
Parameters:
entry - The entry data
search - The search criteria used to locate the entry to be modified
Throws:
Exception - Any exceptions thrown by the connector's underlying classes

findEntry

public Entry findEntry(SearchCriteria search)
                throws Exception
Description copied from class: Connector
Finds an existing entry. The search criteria specifies which entry to locate

Specified by:
findEntry in interface ConnectorInterface
Overrides:
findEntry in class Connector
Parameters:
search - The search criteria used to locate the entry to be modified
Returns:
The entry found, or null if no or multiple entries found
Throws:
Exception - Any exceptions thrown by the connector's underlying classes

deleteEntry

public void deleteEntry(Entry entry,
                        SearchCriteria search)
                 throws Exception
Description copied from class: Connector
Deletes an existing entry. The search criteria specifies which entry to modify. Some connectors may silently ignore the search criteria. For example, the LDAP connector will use the distinguished name ($dn) from the entry parameter (if it exists) rather than expanding the search criteria and search for the entry. Each connector's inner semantics governs wheter the search parameter is used or not.

Specified by:
deleteEntry in interface ConnectorInterface
Overrides:
deleteEntry in class Connector
Parameters:
entry - The entry data
search - The search criteria used to locate the entry to be deleted
Throws:
Exception - Any exceptions thrown by the connector's underlying classes

getProperty

public Object getProperty(Object p1)
Description copied from class: Connector
Return a connector property. Each connector may have static or runtime properties which can be accessed with this method. Note that connector properties are very different from the connector configuration.

Overrides:
getProperty in class Connector
Parameters:
p1 - The property name
Returns:
The property value/object

setProperty

public void setProperty(Object p1,
                        Object p2)
Description copied from class: Connector
Set connector property. This method sets a named property to a given value. Note that connector properties are very different from the connector configuration.

Overrides:
setProperty in class Connector
Parameters:
p1 - The property name
p2 - The property value

getDatabase

public DBFile getDatabase()

getVersion

public String getVersion()
Return version information

Specified by:
getVersion in interface VersionInfoInterface