|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.informatica.powercenter.sdk.mapfwk.core.FieldConstants
public class FieldConstants
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 );
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 |
---|
public static final int NOT_A_KEY
public static final java.lang.String STR_NOT_A_KEY
public static final int PRIMARY_KEY
public static final java.lang.String STR_PRIMARY_KEY
public static final int FOREIGN_KEY
public static final java.lang.String STR_FOREIGN_KEY
public static final int PRIMARY_FOREIGN_KEY
public static final java.lang.String STR_PRIMARY_FOREIGN_KEY
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |