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

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

public class SequenceGenTransformation
extends Transformation

This class implements the Sequence Generator Transformation. It extends the base Transformation to provide this functionality. The Sequence Generator transformation generates numeric values. You can use the Sequence Generator to create unique primary key values, replace missing primary keys, or cycle through a sequential range of numbers.

The Sequence Generator transformation is a connected transformation. It contains two output ports that you can connect to one or more transformations. The PowerCenter Server generates a block of sequence numbers each time a block of rows enters a connected transformation. If you connect CURRVAL, the PowerCenter Server processes one row in each block. When NEXTVAL is connected to the input port of another transformation, the PowerCenter Server generates a sequence of numbers. When CURRVAL is connected to the input port of another transformation, the PowerCenter Server generates the NEXTVAL value plus the Increment By value.

The snippet code shows how to create the Sequence Generator Transformation,

                //create a SequenceGen Transformation using the constructor given below: 
          Mapping mapping = ...; // mapping to which the transform should be added
          TransformationProperties props = ...; // properties           
          SequenceGenTransformation seqGenTrans = new SequenceGenTransformation( "SeqGenTrans", "SeqGenTrans", 
                                                  "This is sequence generator transformation", "SeqGenTrans", 
                                                  mapping, props );
          
          //apply the transformation
          OutputSet outputSet = seqGenTrans.apply();
          
          //get the first rowset as Sequence Generator 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
SequenceGenTransformation()
          Default Constructor.
SequenceGenTransformation(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.
SequenceGenTransformation(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName, Mapping mapping, TransformationProperties props)
          Constructor for Sequence 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

SequenceGenTransformation

public SequenceGenTransformation()
Default Constructor.


SequenceGenTransformation

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

SequenceGenTransformation

public SequenceGenTransformation(java.lang.String name,
                                 java.lang.String busName,
                                 java.lang.String desc,
                                 java.lang.String instName,
                                 Mapping mapping,
                                 TransformationProperties props)
                          throws InvalidTransformationException
Constructor for Sequence Transformation

Parameters:
name -
busName -
desc -
instName -
mapping -
props -
Throws:
InvalidTransformationException
Method Detail

apply

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

Returns:
OutputSet object
Throws:
InvalidTransformationException - exception