getFKColList() Method

Usage

public java.lang.String getFKColList( java.lang.String pStart, 
java.lang.String pPattern, 
java.lang.String pSeparator, 
java.lang.String pEnd)

Alternative syntax:

public java.lang.String getFKColList(
java.lang.String pPattern, 
java.lang.String pSeparator)

Description

Offers a list of columns part of a reference constraint (foreign key).

The parameter pPattern in interpreted and repeated for each element of the list, and separated from its predecessor with the parameter pSeparator. The generated string begins with pStart and ends with pEnd.

This list contains one element for each column of the current foreign key. It is accessible from a Check Knowledge Module only if the current task is tagged as a "reference".

In an action, this method returns the list of the columns of the foreign key handled by the DDL command, ordered by their position in the key.

In the alternative syntax, any parameters not set are set to an empty string.

Parameters

Parameter

Type

Description

pStart

String

This parameter marks the beginning of the string to generate.

pPattern

String

The pattern is repeated for each occurrence in the list.

The list of possible attributes in a pattern is detailed in the table « Pattern Attributes List »

Each attribute occurrence in the pattern string is substituted with its value. The attributes must be between brackets ([ and ])

Example « My string [COL_NAME] is a column »

pSeparator

String

This parameter separates each pattern from its predecessor.

pEnd

String

This parameter marks the end of the string to generate.

Pattern Attributes List

The following table lists the different values of the parameters as well as the associated description.

Parameter value

Description

I_COL

Column internal identifier

COL_NAME

Name of the column of the key

COL_HEADING

Header of the column of the key

COL_DESC

Description of the column of the key

POS

Position of the column of the key

LONGC

Length (Precision) of the column of the key

SCALE

Scale of the column of the key

FILE_POS

Beginning (index) of the column

BYTES

Number of physical octets of the column

FILE_END_POS

End of the column (FILE_POS + BYTES)

IND_WRITE

Write right flag of the column

COL_MANDATORY

Mandatory character of the column (0: not authorized, 1: not null)

CHECK_FLOW

Flow control flag of the column (0: do not check, 1: check)

CHECK_STAT

Static control flag of the column (0: do not check, 1: check)

COL_FORMAT

Logical format of the column

COL_DEC_SEP

Decimal symbol for the column

REC_CODE_LIST

List of the record codes for the column

COL_NULL_IF_ERR

Column processing flag (0 = Reject, 1 = set active trace to null, 2= set inactive trace to null)

DEF_VALUE

Default value of the column

EXPRESSION

Not used

CX_COL_NAME

Not used

ALIAS_SEP

Separator used for the alias (from the technology)

SOURCE_DT

Code of the column's datatype.

SOURCE_CRE_DT

Create table syntax for the column's datatype.

SOURCE_WRI_DT

Create table syntax for the column's writable datatype.

DEST_DT

Code of the column's datatype converted to a datatype on the target technology.

DEST_CRE_DT

Create table syntax for the column's datatype converted to a datatype on the target technology.

DEST_WRI_DT

Create table syntax for the column's writable datatype converted to a datatype on the target technology.

PK_I_COL

Internal identifier of the referenced column

PK_COL_NAME

Name of the referenced key column

PK_COL_HEADING

Header of the referenced key column

PK_COL_DESC

Description of the referenced key column

PK_POS

Position of the referenced column

PK_LONGC

Length of the referenced column

PK_SCALE

Precision of the referenced column

PK_FILE_POS

Beginning (index) of the referenced column

PK_BYTES

Number of physical octets of the referenced column

PK_FILE_END_POS

End of the referenced column (FILE_POS + BYTES)

PK_IND_WRITE

Write right flag of the referenced column

PK_COL_MANDATORY

Mandatory character of the referenced column(0: null authorized, 1: not null)

PK_CHECK_FLOW

Flow control flag of the referenced column (0: do not check, 1: check)

PK_CHECK_STAT

Static control flag of the referenced column (0: do not check, 1: check)

PK_COL_FORMAT

Logical format of the referenced column

PK_COL_DEC_SEP

Decimal separator for the referenced column

PK_REC_CODE_LIST

List of record codes retained for the referenced column

PK_COL_NULL_IF_ERR

Processing flag of the referenced column (0 = Reject, 1 = Set active trace to null, 2= Set inactive trace to null)

PK_DEF_VALUE

Default value of the referenced column

SCD_COL_TYPE

Behavior defined for the Slowly Changing Dimensions for this column in the data model.

<flexfield code>

Flexfield value for the current column of the referencing table.

 

Examples

If the CUSTOMER table references the CITY table on CUSTOMER.COUNTRY_ID = CITY.ID_COUNT and CUSTOMER.CITY_ID = CITY.ID_CIT 

the clause:

(CUS.COUNTRY_ID = CITY.ID_COUNT and CUS.CITY_ID = CITY.ID_CIT)

can also be written:
<%=odiRef.getFKColList("(", "CUS.[COL_NAME] = CITY.[PK_COL_NAME]", " and ", ")" )%>

Explanation: the getFKColList function will be used to loop on each column of the foreign key to generate the clause that begins and ends with a parenthesis and that repeats a pattern separated by and for each column in the foreign key. Thus