Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.3.0)

E17060-01

oracle.odi.domain.model
Class ReferenceColumn

java.lang.Object
  extended by oracle.odi.domain.support.BusinessObject
      extended by oracle.odi.domain.support.AbstractRepositoryEntity
          extended by oracle.odi.domain.model.ReferenceColumn
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IRepositoryEntity

public class ReferenceColumn
extends oracle.odi.domain.support.AbstractRepositoryEntity

A reference column for an OdiReference.

For user or database references, a list of the correspondence between the foreign key table columns (child table) and the primary key table (parent or referenced table) must be defined.
The reference column maintains this correspondence.

Since:
11.1.1.3.0
See Also:
Serialized Form

Nested Class Summary
static class ReferenceColumn.ReferenceColumnId
          Internal: .
 
Constructor Summary
ReferenceColumn(OdiReference pReference, OdiColumn pForeignKeyColumn, OdiColumn pPrimaryKeyColumn)
          Creates an ReferenceColumn for the given Foreign Key and Primary Key columns and add it to the given OdiReference.
 
Method Summary
 OdiColumn getForeignKeyColumn()
          Obtains the foreign key column of this ReferenceColumn instance.
 java.io.Serializable getInternalId()
          Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.
 OdiColumn getPrimaryKeyColumn()
          Obtains the primary key column of this ReferenceColumn instance.
 OdiReference getReference()
          Obtain the OdiReference this ReferenceColumn belongs to.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 
Methods inherited from class oracle.odi.domain.support.BusinessObject
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceColumn

public ReferenceColumn(OdiReference pReference,
                       OdiColumn pForeignKeyColumn,
                       OdiColumn pPrimaryKeyColumn)
Creates an ReferenceColumn for the given Foreign Key and Primary Key columns and add it to the given OdiReference.

In order to be able to create an ReferenceColumn, you must ensure that everything is consistent (i.e. the reference's primary datastore has to be defined, the foreign and primary columns must be consistent with the reference foreign and primary datastore). Otherwise, an Exception will be thrown.

Parameters:
pReference - the parent OdiReference object
pForeignKeyColumn - the FK column
pPrimaryKeyColumn - the PK column
Throws:
java.lang.IllegalArgumentException - if the given reference has an undefined primary datastore
or if the FK or PK columns are null
or if the given FK column doesn't refer to the foreign DataStore of the given reference
or if the given PK column doesn't refer to the primary DataStore of the given reference
java.lang.IllegalStateException - if the given reference's type is OdiReference.ReferenceType.COMPLEX_REFERENCE
Method Detail

getForeignKeyColumn

public OdiColumn getForeignKeyColumn()
Obtains the foreign key column of this ReferenceColumn instance.

Returns:
an OdiColumn object representing the foreign key column value

getInternalId

public java.io.Serializable getInternalId()
Description copied from interface: IRepositoryEntity
Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.

Typically a subclass will delegate to a public SomePrimitiveWrapper getId() method. The necessity for the getInternalId() abstract method is solely because the persistence layer needs a way of obtaining the identity irrespective of the actual identity implementation choice.

Returning null from this method will indicate the object has never been saved. This will likely be relied on by some DAO implementations.

Returns:
the persistence identity of this instance

getPrimaryKeyColumn

public OdiColumn getPrimaryKeyColumn()
Obtains the primary key column of this ReferenceColumn instance.

Returns:
an OdiColumn object representing the primary key column value

getReference

public OdiReference getReference()
Obtain the OdiReference this ReferenceColumn belongs to.

Returns:
an OdiReference object representing the reference value

getSecurityContainer

public IRepositoryEntity getSecurityContainer()
Description copied from interface: IRepositoryEntity
Define a generic way to retrieve container for entities.

Returns:
container entity

Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.3.0)

E17060-01

Copyright © 2010, Oracle and/or its affiliates. All rights reserved.