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

java.lang.Object
  extended by com.informatica.powercenter.sdk.mapfwk.core.FieldConstants

public class FieldConstants
extends java.lang.Object

Defines constants for Field

Currently this class defines key type for a Field in
a Source or Target
Following is a code example for using FieldConstants while creating a flat file source

       // create a vector to hold the fields
       Vector fields = new Vector();
       // create a field of type of integer and add to the vector of fields
       Field field1 = new Field("EmployeeID", "EmployeeID","", DataTypeConstants.INTEGER, "10", "0",
                                                                FieldConstants.PRIMARY_KEY, Field.FIELDTYPE_SOURCE, true);
       fields.add(field1);
       // create a field of type of string and add to the vector of fields
       Field field2 = new Field("LastName", "LastName","", DataTypeConstants.STRING, "20", "0",
                                                                FieldConstants.NOT_A_KEY, Field.FIELDTYPE_SOURCE, false);
       fields.add(field2);
       // create connection info for a flat file source and set the connection
       // properties (not demonstrated in the code)
       ConnectionInfo ffConn = new ConnectionInfo( SourceTargetTypes.FLATFILE_TYPE );
       // create a Source
       Source employeeSource = new Source( "Employee", "Employee", "This is Employee Table",
                                                                                                                                         "Employee", ffConn );
       // set the fields in the Source
       employeeSource.setFields( fields );

  

See Also:
Field.setKeyType(int), Field.getKeyType(), Field.Field(String, String, String, String, String, String, int, int, boolean)

Field Summary
static int FOREIGN_KEY
          FOREIGN_KEY - field is a foreign key
static int NOT_A_KEY
          NOT_A_KEY - field is not a key
static int PRIMARY_FOREIGN_KEY
          PRIMARY_FOREIGN_KEY - field is both primary key and foreign key
static int PRIMARY_KEY
          PRIMARY_KEY - field is a primary key
static java.lang.String STR_FOREIGN_KEY
           
static java.lang.String STR_NOT_A_KEY
           
static java.lang.String STR_PRIMARY_FOREIGN_KEY
           
static java.lang.String STR_PRIMARY_KEY
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_A_KEY

public static final int NOT_A_KEY
NOT_A_KEY - field is not a key

See Also:
Constant Field Values

STR_NOT_A_KEY

public static final java.lang.String STR_NOT_A_KEY
See Also:
Constant Field Values

PRIMARY_KEY

public static final int PRIMARY_KEY
PRIMARY_KEY - field is a primary key

See Also:
Constant Field Values

STR_PRIMARY_KEY

public static final java.lang.String STR_PRIMARY_KEY
See Also:
Constant Field Values

FOREIGN_KEY

public static final int FOREIGN_KEY
FOREIGN_KEY - field is a foreign key

See Also:
Constant Field Values

STR_FOREIGN_KEY

public static final java.lang.String STR_FOREIGN_KEY
See Also:
Constant Field Values

PRIMARY_FOREIGN_KEY

public static final int PRIMARY_FOREIGN_KEY
PRIMARY_FOREIGN_KEY - field is both primary key and foreign key

See Also:
Constant Field Values

STR_PRIMARY_FOREIGN_KEY

public static final java.lang.String STR_PRIMARY_FOREIGN_KEY
See Also:
Constant Field Values