com.informatica.powercenter.sdk.mapfwk.core
Class TransactionControlTransformation

java.lang.Object
  extended by com.informatica.powercenter.sdk.mapfwk.core.Table
      extended by com.informatica.powercenter.sdk.mapfwk.core.Transformation
          extended by com.informatica.powercenter.sdk.mapfwk.core.TransactionControlTransformation
All Implemented Interfaces:
Transform

public class TransactionControlTransformation
extends Transformation

A TransactionControl Transformation is used to manage a Transaction. A transaction can be defined as a set of rows bounded by commit or rollback. The user has to give the transaction control expression. The expression is of the form

IIF ( condition, value1 , value2 ).

The PowerCenter server evaluates the condition on a row by row basis. The return value determines whether PowerCenter commits, rollbacks or does nothing. For Further details see Transformation Guide.

The code snippet for this Transformation is

 
        //create a Transaction Control Transformation using the constructor given below: 
          Mapping mapping = ...; // mapping to which the transform should be added
          InputSet inputSetObj = ...; // the InputSet object
          Vector vTransformFields = ...; // collection of TransformField objects
          String condition = ...; // the transaction control condition
          TransformationProperties props = ...; // properties           
          TransactionControlTransformation transConTrans = new TransactionControlTransformation
                              ( "TransConTrans", "TransConTrans", 
                                                  "This is Transaction Control Transformation", "TransConTrans", 
                                                  mapping, inputSetObj, vTransformFields, condition, props);
          
          //apply the transformation
          OutputSet outputSet = transConTrans.apply();
          
          //get the first rowset as Transaction Control always returns a RowSet
          RowSet outRowSet = (RowSet)outputSet.getRowSets().get(0); 
  
 


Field Summary
 
Fields inherited from class com.informatica.powercenter.sdk.mapfwk.core.Transformation
m_templateID, m_templateName, m_transformFieldAttr, sessionTransformInst
 
Fields inherited from class com.informatica.powercenter.sdk.mapfwk.core.Table
m_bReusable, m_readOnly
 
Constructor Summary
TransactionControlTransformation()
          Default constructor
TransactionControlTransformation(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName)
          Initialize the object with name, business name, description and instance name
TransactionControlTransformation(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName, Mapping mapping, InputSet inputSet, java.util.Vector vTransformFields, java.lang.String condition, TransformationProperties properties)
          Constructor for Transaction Control Transformation
 
Method Summary
 OutputSet apply()
          Apply the Transformation.
 
Methods inherited from class com.informatica.powercenter.sdk.mapfwk.core.Transformation
add, addInitProp, defaultDuplicateNameRemovalSchema, genOutputSet, getGroupSet, getInitProps, getMapping, getOutFields, getOutputSet, getProperties, getSessionTransformInstanceKeySet, getSessionTransformInstanceProperty, getTemplateID, getTemplateName, getTransContext, getTransformationFieldAttr, getTransformationType, getTransformGroup, setGroupSet, setGroupSet, setMapping, setOutFields, setOutputSet, setReusable, setSessionTransformInstanceProperty, setTemplateIDAndName, setTransContext, setTransformationFieldAttr, setTransformationType, setTransformGroup, standardizeString
 
Methods inherited from class com.informatica.powercenter.sdk.mapfwk.core.Table
addField, addMetaExtension, getBusinessName, getDescription, getField, getFields, getInstanceName, getMetaExtensions, getName, getReferencedField, isReadOnly, isReusable, removeField, removeMetaExtension, setBusinessName, setDescription, setFields, setInstanceName, setMetaExtensions, setMetaExtensionValue, setName, setReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionControlTransformation

public TransactionControlTransformation()
Default constructor


TransactionControlTransformation

public TransactionControlTransformation(java.lang.String name,
                                        java.lang.String busName,
                                        java.lang.String desc,
                                        java.lang.String instName)
Initialize the object with name, business name, description and instance name

Parameters:
name - name of the table
busName - business name
desc - description
instName - instance name

TransactionControlTransformation

public TransactionControlTransformation(java.lang.String name,
                                        java.lang.String busName,
                                        java.lang.String desc,
                                        java.lang.String instName,
                                        Mapping mapping,
                                        InputSet inputSet,
                                        java.util.Vector vTransformFields,
                                        java.lang.String condition,
                                        TransformationProperties properties)
                                 throws InvalidTransformationException
Constructor for Transaction Control Transformation

Parameters:
name -
busName -
desc -
instName -
mapping -
inputSet -
vTransformFields -
condition -
properties -
Throws:
InvalidTransformationException
Method Detail

apply

public OutputSet apply()
                throws InvalidTransformationException
Apply the Transformation.

Returns:
OutputSet object
Throws:
InvalidTransformationException - exception