getObjectName() Method

Usage

public java.lang.String getObjectName(
java.lang.String pMode, 
java.lang.String pObjectName, 
java.lang.String pLocation) 

public java.lang.String getObjectName(
java.lang.String pMode, 
java.lang.String pObjectName, 
java.lang.String pLogicalSchemaName, 
java.lang.String pLocation) 

public java.lang.String getObjectName(
java.lang.String pMode, 
java.lang.String pObjectName, 
java.lang.String pLogicalSchemaName, 
java.lang.String pContextName, 
java.lang.String pLocation)
 

public java.lang.String getObjectName(
java.lang.String pObjectName, 
java.lang.String pLocation)
 

public java.lang.String getObjectName(
java.lang.String pObjectName)
 

Description

Returns the complete name of a physical object, including its catalog and schema. The pMode parameter indicates the substitution mask to use.

The first syntax builds the object name according to the current logical schema in the current context.

The second syntax builds the name of the object according to the logical schema indicated in the pLogicalSchemaName parameter in the current context.

The third syntax builds the name from the logical schema and the context indicated in the pLogicalSchemaName and pContextName parameters.

The fourth syntax builds the object name according to the current logical schema in the current context, with the local object mask (pMode = "L").

The fifth syntax is equivalent to the fourth with pLocation = "D".

Parameters

Parameter

Type

Description

pMode

String

"L" use the local object mask to build the complete path of the object.
"R" use the remote object mask to build the complete path of the object.

Note: When using the remote object mask, getObjectName always resolved the object name using the default physical schema of the remote server.

pObjectName

String

Every string that represents a valid resource name (table or file). This object name may be prefixed by a prefix code that will be replaced at run-time by the appropriate temporary object prefix defined for the physical schema.

pLogicalSchemaName

String

Name of the forced logical schema of the object.

pContextName

String

Forced context of the object

pLocation

String

"W"

Returns the complete name of the object in the physical catalog and the "work" physical schema that corresponds to the specified tuple (context, logical schema).

"D"

Returns the complete name of the object in the physical catalog and the data physical schema that corresponds to the specified tuple (context, logical schema.)

Prefixes

It is possible to prefix the resource name specified in the pObjectName parameter by a prefix code to generate a odi temporary object name (Error or Integration table, journalizing trigger, etc.).

The list of prefixes are given below.

Prefix

Description

%INT_PRF

Prefix for integration tables (default value is "I$_").

%COL_PRF

Prefix for Loading tables (default value is "C$_").

%ERR_PRF

Prefix for error tables (default value is "E$_").

%JRN_PRF_TAB

Prefix for journalizing tables (default value is "J$_").

%INT_PRF_VIE

Prefix for journalizing view (default value is "JV$_").

%INT_PRF_TRG

Prefix for journalizing triggers (default value is "T$_").

Note that the temporary objects are usually created in the work physical schema. Therefore, pLocation should be set to "W" when using a prefix to create or access a temporary object.

Examples

If you have defined the physical schema:

Data catalog:

db_odi

Data schema:

dbo

Work catalog:

tempdb

Work schema:

temp_owner

and you have associated this physical schema to the logical schema: MSSQL_ODI in the context CTX_DEV

A call to 

Returns

<%=odiRef.getObjectName("L", "EMP", "MSSQL_ODI", "CTX_DEV", "W")%>

tempdb.temp_owner.EMP

<%=odiRef.getObjectName("L", "EMP", "MSSQL_ODI", "CTX_DEV", "D")%>

db_odi.dbo.EMP

<%=odiRef.getObjectName("R", "%ERR_PRFEMP", "MSSQL_ODI", "CTX_DEV", "W")%>

MyServer.tempdb.temp_owner.E$_EMP

<%=odiRef.getObjectName("R", "EMP", "MSSQL_ODI", "CTX_DEV", "D")%>

MyServer.db_odi.dbo.EMP