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

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.UpdateStrategyTransformation
All Implemented Interfaces:
Transform

public class UpdateStrategyTransformation
extends Transformation

This class implements the Update Strategy Transformation. It extends the base Transformation to provide this functionality.

To control how rows are flagged for insert, update, delete, or reject within a mapping, add an Update Strategy transformation to the mapping. Update Strategy transformations are essential if you want to flag rows destined for the same target for different database operations, or if you want to reject rows. Frequently, the update strategy expression uses the IIF or DECODE function from the transformation language to test each row to see if it meets a particular condition. If it does, you can then assign each row a numeric code to flag it for a particular database operation.

The Update Strategy transformation is created using one or more InputSets and strategy condition.

The snippet code shows how to create the Update Strategy Transformation,

                //create an Update Strategy Transformation using the constructor given below: 
          Mapping mapping = ...; // mapping to which the transform should be added
          InputSet inputSets = ...; // the InputSet object
          String strategyExpr = ...; // the update stratgey expression
          TransformationProperties props = ...; // properties           
          UpdateStrategyTransformation upStTrans = new UpdateStrategyTransformation
                              ( "UpdateStTrans", "UpdateStTrans", 
                                                  "This is Update Strategy Transformation", "UpdateStTrans", 
                                                  mapping, inputSets, strategyExpr, props);
          
          //apply the transformation
          OutputSet outputSet = upStTrans.apply();
          
          //get the first rowset as Update Strategy 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
UpdateStrategyTransformation()
          Default Constructor
UpdateStrategyTransformation(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
UpdateStrategyTransformation(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName, Mapping mapping, java.util.Vector inputSets, java.lang.String strategyExpr, TransformationProperties properties)
          Constructor for Update Strategy 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

UpdateStrategyTransformation

public UpdateStrategyTransformation()
Default Constructor


UpdateStrategyTransformation

public UpdateStrategyTransformation(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

UpdateStrategyTransformation

public UpdateStrategyTransformation(java.lang.String name,
                                    java.lang.String busName,
                                    java.lang.String desc,
                                    java.lang.String instName,
                                    Mapping mapping,
                                    java.util.Vector inputSets,
                                    java.lang.String strategyExpr,
                                    TransformationProperties properties)
                             throws InvalidTransformationException
Constructor for Update Strategy Transformation

Parameters:
name -
busName -
desc -
instName -
mapping -
inputSets -
strategyExpr -
properties -
Throws:
InvalidTransformationException
Method Detail

apply

public OutputSet apply()
                throws InvalidTransformationException
Description copied from interface: Transform
Apply the Transformation.

Returns:
OutputSet object
Throws:
InvalidTransformationException - exception