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

java.lang.Object
  extended by com.informatica.powercenter.sdk.mapfwk.core.Table
      extended by com.informatica.powercenter.sdk.mapfwk.core.SourceTarget
          extended by com.informatica.powercenter.sdk.mapfwk.core.Source
              extended by com.informatica.powercenter.sdk.mapfwk.core.PowerConnectSource
All Implemented Interfaces:
PowerConnect, java.lang.Cloneable

public abstract class PowerConnectSource
extends Source
implements PowerConnect

This class gives additional support for PowerConnect sources.

Author:
asingh

Field Summary
protected  java.lang.String[] fieldAttributeNames
           
protected  java.util.Vector vSourceGroups
           
 
Fields inherited from class com.informatica.powercenter.sdk.mapfwk.core.Table
m_bReusable, m_readOnly
 
Constructor Summary
PowerConnectSource(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName, PowerConnectConInfo connInfo)
          Creates a PowerConnect Source
PowerConnectSource(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName, java.util.Vector connInfos)
          Creates a PowerConnect Source with a collection of ConnectionInfo objects
 
Method Summary
 void addField(Field field)
          add a field to the source
 void addSourceGroup(SourceGroup sourceGroup)
          Add a SourceGroup
 Transformation createASQTransform()
          This function ceates an ASQ Transformation for a given PowerConnect Source
 Field createField(java.lang.String fieldName, SourceGroup sourceGroup, java.lang.String busName, java.lang.String description, java.lang.String dataType, java.lang.String prec, java.lang.String scale, int keyType, int fieldType, boolean notNull)
          Convenience function for creating a field for the source.
 Field createField(java.lang.String fieldName, java.lang.String busName, java.lang.String description, java.lang.String dataType, java.lang.String prec, java.lang.String scale, int keyType, int fieldType, boolean notNull)
          Convenience function for creating a field for the source.
 java.lang.String[] getFieldAttributeNames()
          Get the field attributes asccosicated with source.
abstract  java.lang.String getPowerConnectDataType(java.lang.String sdkDataType)
          Method to return PowerConnect data type for a given SDK data type.
abstract  java.lang.String getReaderName()
          Method to return reader name
abstract  java.lang.String getSDKDataType(java.lang.String pcDataType)
          Method to return SDK datatype for a PowerConnect data type.
 java.util.Vector getSourceGroups()
          Get the source groups that have been added.
 void removeSourceGroup(SourceGroup sourceGroup)
          Remove a SourceGroup
 void setAttribute(Field field, java.util.Map attrMap)
          Sets a Map of attributes for a field
 void setAttribute(Field field, java.lang.String key, java.lang.String value)
          Sets the attributes for a given field
 void setAttribute(java.lang.String fieldName, java.util.Map attrMap)
          Sets a Map of attributes for a field name
 void setAttribute(java.lang.String fieldName, java.lang.String key, java.lang.String value)
          Sets the attributes for a given field name
 void setFieldAttributeNames(java.lang.String[] fieldAttributeNames)
          Set the field attributes names
 
Methods inherited from class com.informatica.powercenter.sdk.mapfwk.core.Source
clone, createDSQTransform, createDSQTransform
 
Methods inherited from class com.informatica.powercenter.sdk.mapfwk.core.SourceTarget
equals, getConflictResolution, getConnInfo, getConnInfos, getDatabaseSubtype, getModifier, getProps, getSessionTransformInstanceKeySet, getSessionTransformInstanceProperty, modify, modify, setConflictResolution, setConnInfo, setConnInfos, setDatabaseSubtype, setFields, setModifier, setProps, setReadOnly, setSessionTransformInstanceProperty, toString
 
Methods inherited from class com.informatica.powercenter.sdk.mapfwk.core.Table
addMetaExtension, getBusinessName, getDescription, getField, getFields, getInstanceName, getMetaExtensions, getName, getReferencedField, isReadOnly, isReusable, removeField, removeMetaExtension, setBusinessName, setDescription, setInstanceName, setMetaExtensions, setMetaExtensionValue, setName, setReusable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fieldAttributeNames

protected java.lang.String[] fieldAttributeNames

vSourceGroups

protected java.util.Vector vSourceGroups
Constructor Detail

PowerConnectSource

public PowerConnectSource(java.lang.String name,
                          java.lang.String busName,
                          java.lang.String desc,
                          java.lang.String instName,
                          PowerConnectConInfo connInfo)
Creates a PowerConnect Source

Parameters:
name -
busName -
desc -
instName -
connInfo -

PowerConnectSource

public PowerConnectSource(java.lang.String name,
                          java.lang.String busName,
                          java.lang.String desc,
                          java.lang.String instName,
                          java.util.Vector connInfos)
Creates a PowerConnect Source with a collection of ConnectionInfo objects

Parameters:
name -
busName -
desc -
instName -
connInfos -
Method Detail

setAttribute

public void setAttribute(Field field,
                         java.lang.String key,
                         java.lang.String value)
Sets the attributes for a given field

Parameters:
field -
key -
value -

setAttribute

public void setAttribute(java.lang.String fieldName,
                         java.lang.String key,
                         java.lang.String value)
Sets the attributes for a given field name

Parameters:
fieldName -
key -
value -

setAttribute

public void setAttribute(Field field,
                         java.util.Map attrMap)
Sets a Map of attributes for a field

Parameters:
field -
attrMap -

setAttribute

public void setAttribute(java.lang.String fieldName,
                         java.util.Map attrMap)
Sets a Map of attributes for a field name

Parameters:
fieldName -
attrMap -

createASQTransform

public Transformation createASQTransform()
                                  throws InvalidTransformationException
This function ceates an ASQ Transformation for a given PowerConnect Source

Throws:
InvalidTransformationException

createField

public Field createField(java.lang.String fieldName,
                         SourceGroup sourceGroup,
                         java.lang.String busName,
                         java.lang.String description,
                         java.lang.String dataType,
                         java.lang.String prec,
                         java.lang.String scale,
                         int keyType,
                         int fieldType,
                         boolean notNull)
Convenience function for creating a field for the source. This function will automatically populate the field attributes associated with a field for the source.

Parameters:
fieldName - name of the field
sourceGroup - The SourceGroup object to which the field should be added to. The sourceGroup will added to the source if not present
busName - business Name
description - description
dataType - data type of the field
prec - precision
scale - scale
keyType - key type
fieldType - field type
notNull - not null field
Returns:
Field Returns the field created. The field will be automatically added to the source.

createField

public Field createField(java.lang.String fieldName,
                         java.lang.String busName,
                         java.lang.String description,
                         java.lang.String dataType,
                         java.lang.String prec,
                         java.lang.String scale,
                         int keyType,
                         int fieldType,
                         boolean notNull)
Convenience function for creating a field for the source. This function will automatically populate the field attributes associated with a field for the source.

Parameters:
fieldName - name of the field
busName - business Name
description - description
dataType - data type of the field
prec - precision
scale - scale
keyType - key type
fieldType - field type
notNull - not null field
Returns:
Field Returns the field created. The field will be automatically added to the source.

addField

public void addField(Field field)
add a field to the source

Overrides:
addField in class Table
Parameters:
field - The field to be added.
See Also:
Field

getSDKDataType

public abstract java.lang.String getSDKDataType(java.lang.String pcDataType)
Method to return SDK datatype for a PowerConnect data type. The SDK datatypes are listed in DataTypeConstants

Parameters:
pcDataType - Power Connect data type
Returns:
SDK data type
See Also:
DataTypeConstants

getPowerConnectDataType

public abstract java.lang.String getPowerConnectDataType(java.lang.String sdkDataType)
Method to return PowerConnect data type for a given SDK data type. The SDK data types are listed in DataTypeConstants

Parameters:
sdkDataType - SDK data type
Returns:
PowerConnect data type
See Also:
DataTypeConstants

getReaderName

public abstract java.lang.String getReaderName()
Method to return reader name

Returns:
reader Name as a string

getFieldAttributeNames

public java.lang.String[] getFieldAttributeNames()
Get the field attributes asccosicated with source. The values for the attributes for each field can be set using Field.getAttribute() and Field.setAttributeValues()

Returns:
String[]

setFieldAttributeNames

public void setFieldAttributeNames(java.lang.String[] fieldAttributeNames)
Set the field attributes names

Parameters:
fieldAttributeNames -

getSourceGroups

public java.util.Vector getSourceGroups()
Get the source groups that have been added.

Returns:
Vector

addSourceGroup

public void addSourceGroup(SourceGroup sourceGroup)
Add a SourceGroup

Parameters:
sourceGroup -

removeSourceGroup

public void removeSourceGroup(SourceGroup sourceGroup)
Remove a SourceGroup

Parameters:
sourceGroup -