public class ReferenceColumn
extends AbstractRepositoryEntity
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.
Modifier and Type | Class and Description |
---|---|
static class |
ReferenceColumn.ReferenceColumnId
Internal: .
|
Constructor and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
OdiColumn |
getForeignKeyColumn()
Obtains the foreign key column of this
ReferenceColumn instance. |
java.io.Serializable |
getInternalId() |
OdiColumn |
getPrimaryKeyColumn()
Obtains the primary key column of this
ReferenceColumn instance. |
OdiReference |
getReference()
Obtain the
OdiReference this ReferenceColumn belongs to. |
IRepositoryEntity |
getSecurityContainer() |
public ReferenceColumn(OdiReference pReference, OdiColumn pForeignKeyColumn, OdiColumn pPrimaryKeyColumn)
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.
pReference
- the parent OdiReference objectpForeignKeyColumn
- the FK columnpPrimaryKeyColumn
- the PK columnDomainRuntimeException
- if the given reference has an undefined primary datastoreDomainRuntimeException
- if the given reference's type is OdiReference.ReferenceType.COMPLEX_REFERENCE
public OdiColumn getPrimaryKeyColumn()
ReferenceColumn
instance.public OdiColumn getForeignKeyColumn()
ReferenceColumn
instance.public IRepositoryEntity getSecurityContainer()
public OdiReference getReference()
OdiReference
this ReferenceColumn
belongs to.public java.io.Serializable getInternalId()