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

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

public class CustomTransformation
extends Transformation

This class implements the Custom Transformation for Active and Passive type. It extends the base Transformation to provide this functionality.

Each Custom transformation specifies a module and a procedure name. You can create a Custom transformation based on an existing shared library or DLL containing the procedure, or you can create a Custom transformation as the basis for creating the procedure. When you create a Custom transformation to use with an existing shared library or DLL, make sure you define the correct module and procedure name

A Active Custom transformation has both input and output groups. It also can have input ports, output ports, and input/output ports. A Passive Custom transformation has only one input and one output group.

The Custom transformation is created using set of GroupSet. The GroupSet has InputSet (input/output ports) and OutputField (output ports) used in Custom Transformation. The apply method validates type of custom transformation. It throws InvalidTransformationException if Passive custom transformation has more than one input and output GroupSet.

The snippet code shows how to create the Custom Transformation,

         //Create a TransformationContext object using set of GroupSet
         TransformationContext tc = new TransformationContext(vgrpSet); 
         
         //Create a Active CustomTransformation using a  (group ports) 
         //For Passive Custom Transformation use Transformation type as TransformationConstants.PASSIVE_CUSTOM 
         customTransform = tc.createTransform(TransformationConstants.ACTIVE_CUSTOM, TransformName); 
         
         //Apply the Custom Transformation
         customTransform.apply();
         
         OR
         
          //you can use helper class
         helper.custom(vGroupSet, TransformationConstants.ACTIVE_CUSTOM , "Custom_Trnasformation_Name" )
        
        apply method returns OutputSet object
 


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
CustomTransformation(int transformType)
          Create custom transformation using transformation type
CustomTransformation(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName, int type)
          Initialize the object with name, business name, description and instance name and type
CustomTransformation(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName, int type, Mapping mapping, java.util.Vector vGroupSets, java.lang.String moduleIdetifier, java.lang.String functionIdetifier, TransformationProperties properties)
          Constructor for Custom Transformation
 
Method Summary
 OutputSet apply()
          Apply the Transformation.
protected  OutputSet genOutputSet(java.util.Vector inputSet)
          Generate the OutputSet for a given Vector of InputSet
 
Methods inherited from class com.informatica.powercenter.sdk.mapfwk.core.Transformation
add, addInitProp, defaultDuplicateNameRemovalSchema, 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

CustomTransformation

public CustomTransformation(int transformType)
Create custom transformation using transformation type

Parameters:
transformType - Transformation type

CustomTransformation

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

Parameters:
name - Transformation name
busName - Transformation business name
desc - Transformation description
instName - Instance name
type - Transformation type

CustomTransformation

public CustomTransformation(java.lang.String name,
                            java.lang.String busName,
                            java.lang.String desc,
                            java.lang.String instName,
                            int type,
                            Mapping mapping,
                            java.util.Vector vGroupSets,
                            java.lang.String moduleIdetifier,
                            java.lang.String functionIdetifier,
                            TransformationProperties properties)
                     throws InvalidTransformationException
Constructor for Custom Transformation

Parameters:
name -
busName -
desc -
instName -
type -
mapping -
vGroupSets -
moduleIdetifier -
functionIdetifier -
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

genOutputSet

protected OutputSet genOutputSet(java.util.Vector inputSet)
Generate the OutputSet for a given Vector of InputSet

Overrides:
genOutputSet in class Transformation
Returns:
OutputSet object