com.ibm.di.connector.ccmdb
Class AbstractDataHandler

java.lang.Object
  extended by com.ibm.di.connector.ccmdb.AbstractDataHandler
Direct Known Subclasses:
ActualCIDataHandler, CIRelationDataHandler

public abstract class AbstractDataHandler
extends java.lang.Object

This class declares methods for retrieving and modifying of data entries based on the selected artifact type.
There is one implementation of this class for each artifact type.


Field Summary
static java.lang.String ALL
           
protected  ExecutionContext ctx
           
 
Constructor Summary
AbstractDataHandler()
           
 
Method Summary
abstract  boolean addEntry(Entry entry)
          Inserts an instance of selected artifact type into the data store.
 java.util.List<java.lang.String> getClassifications(java.lang.String artifactType)
          Returns a list of classification names for a specified artifact type.
abstract  Entry getNextEntry()
          This method returns a single entry object for a selected artifact instance, searched as per criteria.
abstract  Entry getSchema()
          Returns the schema that is based on selected artifact type and class name.
 void init(ExecutionContext context)
           
abstract  boolean removeEntry(Entry entry)
          Removes an instance of selected artifact type from the data store.
abstract  void selectEntries()
          This method will fetch instances of selected artifact type.
abstract  void setSearchCriteria(SearchCriteria criteria)
          Sets the search criteria used in select operation.
abstract  boolean updateEntry(Entry entry)
          Updates an instance of selected artifact type in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final java.lang.String ALL
See Also:
Constant Field Values

ctx

protected ExecutionContext ctx
Constructor Detail

AbstractDataHandler

public AbstractDataHandler()
Method Detail

init

public void init(ExecutionContext context)
Parameters:
context - the executionContext instance associated with the current execution.

getClassifications

public java.util.List<java.lang.String> getClassifications(java.lang.String artifactType)
                                                    throws CCMDBException
Returns a list of classification names for a specified artifact type.

Parameters:
artifactType - Artifact type name
Returns:
List List that contains classification names
Throws:
CCMDBException - if a problem occurs.

setSearchCriteria

public abstract void setSearchCriteria(SearchCriteria criteria)
                                throws CCMDBException
Sets the search criteria used in select operation.

Parameters:
criteria - SearchCriteria object provided by CE
Throws:
CCMDBException - if a problem occurs.

getSchema

public abstract Entry getSchema()
                         throws CCMDBException
Returns the schema that is based on selected artifact type and class name.

Returns:
Entry The schema.
Throws:
CCMDBException - if a problem occurs.

selectEntries

public abstract void selectEntries()
                            throws CCMDBException
This method will fetch instances of selected artifact type. The selection is based on selected class name and search criteria that has been set.

Throws:
CCMDBException - if a problem occurs.

getNextEntry

public abstract Entry getNextEntry()
                            throws CCMDBException
This method returns a single entry object for a selected artifact instance, searched as per criteria.

Returns:
Entry the next read entry.
Throws:
CCMDBException - if a problem occurs.

addEntry

public abstract boolean addEntry(Entry entry)
                          throws CCMDBException
Inserts an instance of selected artifact type into the data store.

Parameters:
entry - the Entry to be added.
Returns:
boolean indicates if the entry has been added successfully.
Throws:
CCMDBException - if a problem occurs.

removeEntry

public abstract boolean removeEntry(Entry entry)
                             throws CCMDBException
Removes an instance of selected artifact type from the data store. The instance is identified based on an input entry.

Parameters:
entry - the Entry to be deleted.
Returns:
boolean indicates if the specified artifact has been deleted successfully.
Throws:
CCMDBException - if a problem occurs.

updateEntry

public abstract boolean updateEntry(Entry entry)
                             throws CCMDBException
Updates an instance of selected artifact type in the database. The instance attributes are extracted from an input entry.

Parameters:
entry - The Entry to be updated.
Returns:
boolean indicates if the specified artifact has been updated successfully.
Throws:
CCMDBException - if a problem occurs.