|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.3.0) E17060-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectoracle.odi.domain.support.BusinessObject
oracle.odi.domain.support.AbstractRepositoryEntity
oracle.odi.domain.support.AbstractOdiEntity
oracle.odi.domain.model.OdiReference
public class OdiReference
An OdiReference is a reference between a foreign OdiDataStore and a primary OdiDataStore.
The reference is a functional link between two datastores. It corresponds to a foreign key in a relational model. For example: The INVOICE datastore references the CUSTOMER datastore through the customer number.
From a persitence point of view the OdiReference belongs to the foreign datastore: getForeignDataStore().
Note: ReferenceColumns are added to the reference by constructing reference columns
and are removed by removeReferenceColumn(oracle.odi.domain.model.ReferenceColumn)
| Nested Class Summary | |
|---|---|
static class |
OdiReference.ReferenceType
Defines the possible types of references. |
| Field Summary | |
|---|---|
static int |
NAME_MAX_LENGTH
Maximum length supported for the "name" property. |
static int |
PRIMARY_DATASTORE_ALIAS_MAX_LENGTH
Maximum length supported for the "primaryDataStoreName" property. |
| Fields inherited from class oracle.odi.domain.support.AbstractOdiEntity |
|---|
STARTING_INTERNAL_VERSION |
| Constructor Summary | |
|---|---|
OdiReference(OdiDataStore pForeignDataStore,
OdiDataStore pPrimaryDataStore,
java.lang.String pName)
Creates an OdiReference for the given foreign and primary OdiDataStores. |
|
| Method Summary | |
|---|---|
Expression |
getComplexSqlExpression()
Returns the complex SQL expression of this OdiReference instance, or null if none. |
OdiDataStore |
getForeignDataStore()
Returns the foreign datastore of this OdiReference instance (the datastore that contains the FK). |
java.io.Serializable |
getInternalId()
Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used. |
java.lang.String |
getName()
Returns the name of this OdiReference instance. |
OdiDataStore |
getPrimaryDataStore()
Returns the primary datastore of this OdiReference (the datastore that contains the PK). |
java.lang.String |
getPrimaryDataStoreAlias()
Returns the primary datastore alias for this OdiReference instance. |
java.lang.String |
getPrimaryDataStoreCatalogName()
Get the primary data store catalog name for this OdiReference instance. |
java.lang.String |
getPrimaryDataStoreName()
Get the primary data store name for this OdiReference instance. |
java.lang.String |
getPrimaryDataStoreSchemaName()
Get the primary data store schema name for this OdiReference instance. |
java.util.Collection<ReferenceColumn> |
getReferenceColumns()
Returns an unmodifiable, sorted collection of reference columns of this OdiReference instance. |
java.lang.Number |
getReferenceId()
Returns the internal identifier of this OdiReference. |
OdiReference.ReferenceType |
getReferenceType()
Returns the reference type of this OdiReference instance. |
IRepositoryEntity |
getSecurityContainer()
Define a generic way to retrieve container for entities. |
boolean |
isActive()
Returns whether this OdiReference instance is active or not. |
boolean |
isFlowCheckEnabled()
Returns whether the flow check is enabled for this OdiReference or not. |
boolean |
isStaticCheckEnabled()
Returns whether the static check is enabled for this OdiReference or not. |
void |
moveReferenceColumn(ReferenceColumn pReferenceColumn,
int pNewPosition)
Change the position of the given ReferenceColumn to a new position and arrange
position of other elements accordingly. |
void |
removeReferenceColumn(ReferenceColumn pReferenceColumn)
Actually remove the given ReferenceColumn from the reference columns associated
to this OdiReference instance. |
void |
setActive(boolean pActive)
Defines whether this OdiReference instance is active or not. |
void |
setComplexSqlExpression(Expression pExpression)
Sets the complex SQL expression of this OdiReference instance. |
void |
setComplexSqlExpression(java.lang.String pExpressionString,
GlobalExpressionContext pGlobalContext,
com.sunopsis.language.SnpsLanguage pLanguage)
Convenient method to set the "complexSqlExpression" property of this reference from the given expression string value. |
void |
setFlowCheckEnabled(boolean pFlowCheckEnabled)
Defines whether the flow check is enabled for this OdiReference or not. |
void |
setName(java.lang.String pName)
Sets the name of this OdiReference instance. |
void |
setPrimaryDataStore(OdiDataStore pPrimaryDataStore)
Sets the primary data store (i.e. |
void |
setPrimaryDataStoreAlias(java.lang.String pPrimaryDatastoreAlias)
Sets the primary data store alias for this OdiReference instance. |
void |
setReferenceType(OdiReference.ReferenceType pReferenceType)
Sets the OdiReference.ReferenceType for this OdiReference instance. |
void |
setStaticCheckEnabled(boolean pStaticCheckEnabled)
Defines whether the static check is enabled for this OdiReference or not. |
| Methods inherited from class oracle.odi.domain.support.AbstractOdiEntity |
|---|
equals, getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, hashCode, isInstanceLevelSecurityNeeded, isNew, toString |
| Methods inherited from class oracle.odi.domain.support.BusinessObject |
|---|
clone |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface oracle.odi.domain.IOdiEntity |
|---|
getFirstDate, getFirstUser, getLastDate, getLastUser, isInstanceLevelSecurityNeeded |
| Field Detail |
|---|
public static final int NAME_MAX_LENGTH
OdiReference(OdiDataStore, OdiDataStore, String),
Constant Field Valuespublic static final int PRIMARY_DATASTORE_ALIAS_MAX_LENGTH
setPrimaryDataStoreAlias(String),
Constant Field Values| Constructor Detail |
|---|
public OdiReference(OdiDataStore pForeignDataStore,
OdiDataStore pPrimaryDataStore,
java.lang.String pName)
OdiReference for the given foreign and primary OdiDataStores.
This constructor also sets the name of the reference
pForeignDataStore - the foreign data store (the one that contains the FK)pPrimaryDataStore - the primary data store (the one that contains the PK)pName - the name of the reference
java.lang.IllegalArgumentException - if the name is not valid (empty of length greater than 128)
or if one of the table is null| Method Detail |
|---|
public Expression getComplexSqlExpression()
OdiReference instance, or null if none.
java.lang.IllegalStateException - if the type of reference is not OdiReference.ReferenceType.COMPLEX_REFERENCEOdiReference.ReferenceType,
setComplexSqlExpression(Expression)public OdiDataStore getForeignDataStore()
OdiReference instance (the datastore that contains the FK).
public java.io.Serializable getInternalId()
IRepositoryEntity
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.
getInternalId in interface IRepositoryEntitypublic java.lang.String getName()
OdiReference instance.
getName in interface IOdiEntitygetName in class oracle.odi.domain.support.AbstractOdiEntitysetName(String)public OdiDataStore getPrimaryDataStore()
OdiReference (the datastore that contains the PK).
setPrimaryDataStore(OdiDataStore)public java.lang.String getPrimaryDataStoreAlias()
OdiReference instance.
Invoking this method will throw an IllegalStatException if the reference type
isn't OdiReference.ReferenceType.COMPLEX_REFERENCE.
java.lang.IllegalStateException - if this reference's type isn't OdiReference.ReferenceType.COMPLEX_REFERENCEsetReferenceType(OdiReference.ReferenceType),
setPrimaryDataStoreAlias(String)public java.lang.String getPrimaryDataStoreCatalogName()
OdiReference instance.
public java.lang.String getPrimaryDataStoreName()
OdiReference instance.
public java.lang.String getPrimaryDataStoreSchemaName()
OdiReference instance.
public java.util.Collection<ReferenceColumn> getReferenceColumns()
OdiReference instance.
removeReferenceColumn(ReferenceColumn)public java.lang.Number getReferenceId()
OdiReference.
public OdiReference.ReferenceType getReferenceType()
OdiReference instance.
setReferenceType(ReferenceType)public IRepositoryEntity getSecurityContainer()
IRepositoryEntity
getSecurityContainer in interface IRepositoryEntitypublic boolean isActive()
OdiReference instance is active or not.
true if this OdiReference is active, false otherwisesetActive(boolean)public boolean isFlowCheckEnabled()
OdiReference or not.
true if enabled, false otherwisesetFlowCheckEnabled(boolean)public boolean isStaticCheckEnabled()
OdiReference or not.
true if enabled, false otherwisesetFlowCheckEnabled(boolean)
public void moveReferenceColumn(ReferenceColumn pReferenceColumn,
int pNewPosition)
ReferenceColumn to a new position and arrange
position of other elements accordingly.
pReferenceColumn - the reference column to movepNewPosition - the new position
java.lang.IllegalArgumentException - if the given reference column is null
java.lang.IllegalArgumentException - if the given reference column doesn't belong to this referencepublic void removeReferenceColumn(ReferenceColumn pReferenceColumn)
ReferenceColumn from the reference columns associated
to this OdiReference instance.
This will reorder position of each reference columns of this OdiReference
accordingly.
pReferenceColumn - the reference column to remove
java.lang.IllegalArgumentException - if the parameter is null
java.lang.IllegalArgumentException - if the parameter reference column is not associated with this instance of OdiReferencepublic void setActive(boolean pActive)
OdiReference instance is active or not.
By default, an OdiReference is active.
pActive - true to make this OdiReference active, false otherwiseisActive()public void setComplexSqlExpression(Expression pExpression)
OdiReference instance.
A complex SQL expression could only be set on OdiReference that are
defined as complex reference (i.e. OdiReference.ReferenceType.COMPLEX_REFERENCE).
pExpression - the complex SQL expression
java.lang.IllegalStateException - if the type of reference is not OdiReference.ReferenceType.COMPLEX_REFERENCEOdiReference.ReferenceType,
getComplexSqlExpression()
public void setComplexSqlExpression(java.lang.String pExpressionString,
GlobalExpressionContext pGlobalContext,
com.sunopsis.language.SnpsLanguage pLanguage)
That implementation internally use a ExpressionStringParser to create the expression.
The expression is created using the given GlobalExpressionContext and OdiDataStoreExpressionContext
against "foreignDataStore" and "primaryDataStore" of this reference.
pExpressionString - the full string representation of the expressionpGlobalContext - the global expression contextpLanguage - the language to be used during parsing of the stringgetComplexSqlExpression()public void setFlowCheckEnabled(boolean pFlowCheckEnabled)
OdiReference or not.
By default, flow check is enabled.
pFlowCheckEnabled - true to make flow check enabled, false otherwiseisFlowCheckEnabled()public void setName(java.lang.String pName)
OdiReference instance.
pName - the reference name
java.lang.IllegalArgumentException - if the name is null, empty or longer than 128NAME_MAX_LENGTH,
getName()public void setPrimaryDataStore(OdiDataStore pPrimaryDataStore)
OdiReference.
If any previous primary datastore was set, this method
clears any ReferenceColumns already defined for this reference.
If the given primary datastore is equals to the previous one, this method does nothing and simply return.
pPrimaryDataStore - the primary data store
java.lang.IllegalArgumentException - if the given datastore is nullgetPrimaryDataStore()public void setPrimaryDataStoreAlias(java.lang.String pPrimaryDatastoreAlias)
OdiReference instance.
In order to invoke that method, this OdiReference must be defined
with a OdiReference.ReferenceType.COMPLEX_REFERENCE as reference type. Otherwise this
method will throw an IllegalStateException.
pPrimaryDatastoreAlias - the alias name of the primary datastore
java.lang.IllegalArgumentException - if the name is null, empty or longer than 128
java.lang.IllegalStateException - if this reference's type isn't OdiReference.ReferenceType.COMPLEX_REFERENCEgetPrimaryDataStoreAlias()public void setReferenceType(OdiReference.ReferenceType pReferenceType)
OdiReference.ReferenceType for this OdiReference instance.
Setting a reference type to OdiReference.ReferenceType.COMPLEX_REFERENCE will
clear any reference columns.
By default, the reference type of an OdiReference is OdiReference.ReferenceType.ODI_REFERENCE.
pReferenceType - the type of reference
java.lang.IllegalArgumentException - if the type is nullgetReferenceType()public void setStaticCheckEnabled(boolean pStaticCheckEnabled)
OdiReference or not.
By default, static check is enabled.
pStaticCheckEnabled - true to make static check enabled, false otherwiseisFlowCheckEnabled()
|
Oracle® Data Integrator Java API Reference 11g Release 1 (11.1.1.3.0) E17060-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||