Skip navigation links

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

E17060-04


oracle.odi.interfaces.interactive.support
Class InteractiveInterfaceHelperWithActions

java.lang.Object
  extended by oracle.odi.interfaces.interactive.support.InteractiveInterfaceHelperWithActions

All Implemented Interfaces:
IActionHelper, IInteractiveInterfaceHelper, IInteractiveInterfaceHelperWithActions

public class InteractiveInterfaceHelperWithActions
extends java.lang.Object
implements IInteractiveInterfaceHelperWithActions

InterfaceInterfaceHelperWithActions is a helper class that works in conjunction with the interactive interface action classes found in package oracle.odi.interfaces.interactive.support.actions in order to create or modify the ODI interface objects that define the execution behavior of the interface. The objects that can be created or modified include sources, targets, mappings, filter, joins, and other clauses that define an ETL operation.

General Concepts: The general usage of the interactive interface helper and action classes is as follows: First create instance of this interface helper class. Then create an action class by calling it's constructor. Then call this helper's performAction method with a reference to the action class as one of the calling parameters.

Performing the action: Though the action classes themselves have a performAction method, it is for internal use only. The creation or modification action should be performed using the performAction method in this helper class. Here is an example of creating a join object between two sources:

InteractiveInterfaceHelperWithActions interactiveHelper = new InteractiveInterfaceHelperWithActions(odiInterface, myOdiInstance, myOdiInstance.getTransactionalEntityManager(), new SourceSetComputerEraser(odiInterface), new SourceSetCreatorNew(), new SourceSetNameProviderBasicIncrement(), new MappingPersistencePolicyDefault());
InterfaceActionAddJoin addJoinAction = new InterfaceActionAddJoin(myDataSet, mySQLJoinCondition, OdiInterface.ExecutionLocation.SOURCE);
interactiveHelper.performAction(addJoinAction);


Expression Strings: Many of the action class constructors require an expression string as a calling parameter. The expression strings may refer to objects that can be used in the interface, such as source table columns, variables, sequences, etc.

When referring to source table columns in an expression string, the source table alias must be used. For example, if two join sources EMP and DEPT have aliases "EMP_ALIAS" and "DEPT_ALIAS", then the passed-in SQL join condition string might be "EMP_ALIAS.DEPTNO = DEPT_ALIAS.DEPTNO".

A reliable way to create the join condition string is to create an Expression object by calling ExpressionStringBuilder class methods, then call method getAsString on the resultant Expression object. Here is an example of creating the expression string "<mySrcDataStore1_alias>.DEPT_ID = <mySrcDataStore2_alias>.DEPT_ID":

ExpressionStringBuilder stringBuilder = new ExpressionStringBuilder(getLanguageProvider().getSnpsLanguageByTechnologyName(mySourceDataStore1.getModel().getTechnology().getInternalName()));
stringBuilder.append(mySourceDataStore1.getColumn("DEPT_ID"), mySourceDataStore1.getDefaultAlias()).append("=").append(mySourceDataStore2.getColumn("DEPT_ID"), mySourceDataStore2.getDefaultAlias());
Expression myExpression = stringBuilder.toExpression();
String mySQLJoinCondition = myExpression.getAsString();


The advantage of creating it this way is that the actual string values of the data store aliases and columns do not need to be known when the code is written, and the code will remain accurate even if the alias names are later changed.

Reverse Actions: Most action classes will call an undo listener to add a reverse or undo action that can be performed to undo the action itself.

Auto-fix manager: This helper can contain an instance of the <@link IAutoFixManager> interface. Depending on the functionality of the particular auto-fix manager implementation, it may cause problems or issues to be automatically fixed after an action is performed.

Source Set Computer/Creator: This helper also contains a ISourceSetComputer and a ISourceSetCreator interface instance object. Each interface contains a set of SourceSet objects, which group the executable objects (e.g. joins and mappings) according to their execution location. The source sets must be created according to some strategy, after the interface objects have all been added. For the SDK, the source set computer and creator do this work. The source set computer determines the strategy for creating source sets based on the interface objects, settings, and KMs. The source set creator actually creates each source set, and is called by the source set computer. A common source set computer implementation that can be used for many generic cases is SourceSetComputerRetainer. The source set computer and creator implementation instance can be passed to the helper in it's constructor.

Retrieving the created object: When an action is performed that creates a new object, for example InterfaceActionAddFilter, then it may be useful at some point to retrieve a reference to the newly created object or objects. The <@link IImpacts> interface instance that is returned from the performAction call can be used to retrieve the object. Here is a sample method that could be used to retrieve the objects.

protected <T extends IInterfaceSubComponent> T findAddedObject(IImpacts impacts, Class<T> clazz) { for (InterfaceObjectModification modif : impacts.getModifications()) if (clazz.isInstance(modif.getModifiedObject()) && modif.getModification().equals(InterfaceObjectModification.Modification.OBJECT_ADDED)) return (T) modif.getModifiedObject(); System.out.println("Could not find new object of type " + clazz.getName()); return null; }

The key to this method is the use of the getModifiedObject() in the IImpacts interface.

Since:
11.1.1.3.0

Field Summary
static java.util.logging.Logger JAVA_LOGGER
           

 

Constructor Summary
InteractiveInterfaceHelperWithActions(OdiInterface pInterface, OdiInstance pOdiInstance, IOdiEntityManager pOdiEntityManager)
          Constructor for this helper class, that takes an entity manager instance reference.
InteractiveInterfaceHelperWithActions(OdiInterface pInterface, OdiInstance pOdiInstance, IOdiEntityManager pOdiEntityManager, IInterfaceActionListener pActionListenerForChangesAtOpenTime)
          Constructor for this helper class, that takes an entity manager and an action listener interface instance reference.
InteractiveInterfaceHelperWithActions(OdiInterface pInterface, OdiInstance pOdiInstance, IOdiEntityManager pOdiEntityManager, ISourceSetComputer pSourceSetComputer, ISourceSetCreator pSourceSetCreator, ISourceSetNameProvider pSourceSetNameProvider, IMappingPersistencePolicy pMappingPersistencePolicy)
          Constructor for this helper class, that takes an entity manager and an action listener interface instance reference.
InteractiveInterfaceHelperWithActions(OdiInterface pInterface, OdiInstance pOdiInstance, IOdiEntityManager pOdiEntityManager, ISourceSetComputer pSourceSetComputer, ISourceSetCreator pSourceSetCreator, ISourceSetNameProvider pSourceSetNameProvider, IMappingPersistencePolicy pMappingPersistencePolicy, IAutoFixManager pAutoFixManager)
          Constructor for this helper class, that allows more specialized creator and provider classes to be specified.
InteractiveInterfaceHelperWithActions(OdiInterface pInterface, OdiInstance pOdiInstance, IOdiEntityManager pOdiEntityManager, ISourceSetComputer pSourceSetComputer, ISourceSetCreator pSourceSetCreator, ISourceSetNameProvider pSourceSetNameProvider, IMappingPersistencePolicy pMappingPersistencePolicy, IAutoFixManager pAutoFixManager, IInterfaceActionListener pActionListenerForChangesAtOpenTime)
          Constructor for this helper class, that allows more specialized creator and provider classes to be specified.
InteractiveInterfaceHelperWithActions(OdiInterface pInterface, OdiInstance pOdiInstance, IOdiEntityManager pOdiEntityManager, ISourceSetComputer pSourceSetComputer, ISourceSetCreator pSourceSetCreator, ISourceSetNameProvider pSourceSetNameProvider, IMappingPersistencePolicy pMappingPersistencePolicy, IAutoFixManager pAutoFixManager, IInterfaceActionListener pActionListenerForChangesAtOpenTime, boolean pGarbagedDestroyedObject)
          A detailed constructor for this helper class, allowing for many specialized settings.

 

Method Summary
 boolean areSourceSetsDirty()
          Returns true if the source sets should be recomputed.
static boolean checkAcceptsKMTechnologies(OdiKM<?> pOdiKM, java.lang.Boolean pMultiConnection, OdiTechnology pSourceTechnology, OdiTechnology pTargetTechnology)
          Returns true if the specified KM supports the given source and target technology, and multiple connection setting.
static void checkSubInterfaceValid(OdiInterface pSubInterface)
          A static method to check for validity of a sub-interface.
static OdiKM<?> chooseKM(OdiTechnology pSourceTechnology, OdiTechnology pDestinationTechnology, java.util.Collection<? extends OdiKM> pKMs)
          Deprecated. Use chooseKM(String pProjectCode, final IOdiEntityManager pEntityManager, final OdiTechnology pSourceTechnology, final OdiTechnology pDestinationTechnology, Class pKMClass, boolean pMultiConnexion) instead
static OdiKM<?> chooseKM(OdiTechnology pSourceTechnology, OdiTechnology pDestinationTechnology, java.util.Collection<? extends OdiKM> pKMs, boolean pToFilter, java.lang.Boolean pMultiConnexion)
          Deprecated. Use chooseKM(String pProjectCode, final IOdiEntityManager pEntityManager, final OdiTechnology pSourceTechnology, final OdiTechnology pDestinationTechnology, Class pKMClass, boolean pMultiConnexion) instead
static OdiKM<?> chooseKM(java.lang.String pProjectCode, IOdiEntityManager pEntityManager, OdiTechnology pSourceTechnology, OdiTechnology pDestinationTechnology, java.lang.Class pKMClass, boolean pMultiConnexion)
          A static method used to pick a KM from among the available KMs.
static OdiInterface.ExecutionLocation computeExecutionLocationForDatastores(SourceDataStore pSrcDataStore1, SourceDataStore pSrcDataStore2)
          For internal use only Computes the default exection location of an expression between two specfied data stores.
 Expression computeExpression(java.lang.String pSql, IExecutableTextHolder pExecutableTextHolder, OdiInterface.ExecutionLocation pExecutionLocation, DataSet pDataSet)
          For internal use only Computes the expression object of the specified SQL expression text for the given text holder in the desired data set and execution location.
 Expression computeExpression(java.lang.String pSql, OdiInterface.ExecutionLocation pExecutionLocation, DataSet pDataSet, IExpressionContext pExpressionContext)
          This method computes an expression from a Sql text that would be executed on a DataSet and in the specified Location.
 IImpacts computeSourceSets()
          Recomputes the SourceSet objects for the associated interface.
Should be called at some point after source data stores are added to or removed from the interface, or some mappings/joins/filters have been added or had their locations changed, to create the correct source sets.
Typically called before setting the KMs for the interface source set, or before calling preparePersist.
The current source set computer (which can be passed to the constructor for this helper instance) will be used to compute the source sets.
To know whether you should call this method, use areSourceSetsDirty().
 TargetMapping createTargetMapping(DataSet pDataSet, TargetColumn pColumn, OdiInterface.ExecutionLocation pLocation, java.lang.Object pText)
          For internal use only Create a new target mapping.
 java.util.Collection<IInterfaceIssue> getAllCurrentIssues()
          Returns the current set of IInterfaceIssue objects associated with the interface.
 ContextManager getContextManager()
          Returns the context manager for this helper.
 java.util.Collection<IInterfaceIssue> getCurrentIssues(IInterfaceSubComponent pSubComponent)
          Returns the current set of IInterfaceIssue objects that are associated with the specified sub-component.
 IOdiEntityManager getEntityManager()
          Return the IOdiEntityManager instance that is used to control object persistence and synchronization for this helper.
 IExecutionArea getExecutionArea(IInterfaceSubComponent pInterfaceSubComponent)
          Returns the IExecutionArea interface instance that represents the location where the specified interface sub-component will be executed.
This is mainly for internal use.
 java.util.Collection<IExecutionArea> getExecutionAreas(DataSet pDataSet)
          Returns a collection of IExecutionArea instances that represent the locations where all interface sub-components belonging to the specified data set are located.
static com.sunopsis.language.SnpsLanguage getLanguageForTechnology(OdiTechnology pTechnology, OdiInstance pOdiInstance)
          A static convenience method to retrieve the SnpsLanguage object that is associated with the given technology.
 com.sunopsis.language.SnpsLanguage getLanguageForTextHolder(IExecutableTextHolder pExecutableTextHolder)
          Retrieves the language for a specified IExecutableTextHolder object.
static OdiLogicalSchema getLogicalSchemaForTextHolder(OdiInterface pOdiInterface, IExecutableTextHolder pExecutableTextHolder)
          A static convenience method to retrieve the logical schema associated with the specified text holder.
 ReferenceManagerLookups getLookupsManager()
          Returns an IReferenceManager instance that can be used to get lookup references (i.e.
 IMappingPersistencePolicy getMappingPersistencePolicy()
          Returns the current IMappingPersistencePolicy object that is used to set the persistence policy for the interface mappings and target columns.
 com.sunopsis.versioning.SnpsMissingRefsManager getMissingRefsManager()
          Returns the missing references manager for this helper.
 OdiInstance getOdiInstance()
          Returns the current open OdiInstance object used to retrieve languages and global objects (Variables, Sequence, User functions).
 OdiInterface getOdiInterface()
          Returns the interface associated with this helper.
static OdiPhysicalSchema getPhysicalSchema(OdiLogicalSchema pLogicalSchema, OdiContext pContext)
          A static convenience method to return the associated physical schema for the specified logical schema, in the specified context.
 IReferenceManager getReferenceManagerToDataStoreAttached()
          Returns an IReferenceManager instance that can be used to get data store references from the interface, for attached data stores.
Attached data stores are those data stores that are indirectly associated with an interface object by a reference, for instance via Join.getAttachedDataStore1().
This implementation returns an instance of ReferenceManagerLightDataStores.
 IReferenceManager getReferenceManagerToDataStoreFull()
          Returns an IReferenceManager instance that can be used to get data store references from the interface.
 IReferenceManager getReferenceManagerToDataStoreXRefs()
          Returns an IReferenceManager instance that can be used to get references to SourceDataStores from cross-references in expressions.
This implementation returns an instance of ReferenceManagerHeavyDataStores.
 IReferenceManager getReferenceManagerToSourceColumn()
          Returns an IReferenceManager instance that can be used to get SourceColumn references from cross-references in the interface.
This implementation returns an instance of ReferenceManagerLookups.
static OdiPhysicalSchema getSourceDataStorePhysicalSchema(SourceDataStore pSourceDataStore)
          A static convenience method to retrieve the physical schema associated with the specified source data store.
 ISourceSetCreator getSourceSetCreator()
          Returns the current ISourceSetCreator interface instance object that is used to create the source sets.
 ISourceSetNameProvider getSourceSetNameProvider()
          Returns the current ISourceSetNameProvider interface instance object that is used to generate source set names.
static OdiPhysicalSchema getStagingAreaPhysicalSchema(OdiInterface pInterface)
          A static convenience method to get the staging area physical schema for the specified interface.
static OdiPhysicalSchema getTargetDataStorePhysicalSchema(OdiInterface pInterface)
          A static convenience method to get the target datastore's physical schema for the specified interface.
static boolean isNativeSequenceInDerivedSelect(IInterfaceSubComponent pJoin)
           used to check whether a derived sub-interfaces includes a native sequence or not
 IImpacts performAction(IInterfaceAction pAction)
          Performs the specified action, using the default autofix manager that was provided when creating this InteractiveInterfaceHelperWithActions.
 IImpacts performAction(IInterfaceAction pAction, IAutoFixManager pAutoFixManager)
          Performs the specified action, and uses the specified auto fix manager to do automatic fixing of interface issues.
 void performRefreshDataStores()
          Refresh TargetDataStore and SourceDataStore, according to update done on the underlying datastore.
 void preparePersist()
          Called to inform the ODI persistence layer that this interface will be persisted.
 void refreshCrossReferences()
          For internal use only Refresh the context manager for global and project references, and recompute all cross references.
 void removeTargetMapping(TargetMapping pMapping)
          For internal use only Remove the specified targe tmapping.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

JAVA_LOGGER

public static java.util.logging.Logger JAVA_LOGGER

Constructor Detail

InteractiveInterfaceHelperWithActions

public InteractiveInterfaceHelperWithActions(OdiInterface pInterface,
                                             OdiInstance pOdiInstance,
                                             IOdiEntityManager pOdiEntityManager)
Constructor for this helper class, that takes an entity manager instance reference.
Parameters:
pInterface - The interface that the helper will modify.
pOdiInstance - Reference to the ODI instance that is currently open.
pOdiEntityManager - The entity manager that will be used to manage persistence.

InteractiveInterfaceHelperWithActions

public InteractiveInterfaceHelperWithActions(OdiInterface pInterface,
                                             OdiInstance pOdiInstance,
                                             IOdiEntityManager pOdiEntityManager,
                                             IInterfaceActionListener pActionListenerForChangesAtOpenTime)
Constructor for this helper class, that takes an entity manager and an action listener interface instance reference.
Parameters:
pInterface - The interface that the helper will modify.
pOdiInstance - Reference to the ODI instance that is currently open.
pOdiEntityManager - The entity manager that will be used to manage persistence.
pActionListenerForChangesAtOpenTime - An action listener instance that will be notified of interface changes.

InteractiveInterfaceHelperWithActions

public InteractiveInterfaceHelperWithActions(OdiInterface pInterface,
                                             OdiInstance pOdiInstance,
                                             IOdiEntityManager pOdiEntityManager,
                                             ISourceSetComputer pSourceSetComputer,
                                             ISourceSetCreator pSourceSetCreator,
                                             ISourceSetNameProvider pSourceSetNameProvider,
                                             IMappingPersistencePolicy pMappingPersistencePolicy)
Constructor for this helper class, that takes an entity manager and an action listener interface instance reference.
Parameters:
pInterface - The interface that the helper will modify.
pOdiInstance - Reference to the ODI instance that is currently open.
pOdiEntityManager - The entity manager that will be used to manage persistence.
pSourceSetComputer - The source set computer used to recompute the SourceSet object for the interface.
pSourceSetCreator - The source set creator used to create the SourceSet object for the interface.
pSourceSetNameProvider - The source set name provider used to generate source set names for the interface.
pMappingPersistencePolicy - The mapping persistence policy interface instance used to determine the persistence policy.

InteractiveInterfaceHelperWithActions

public InteractiveInterfaceHelperWithActions(OdiInterface pInterface,
                                             OdiInstance pOdiInstance,
                                             IOdiEntityManager pOdiEntityManager,
                                             ISourceSetComputer pSourceSetComputer,
                                             ISourceSetCreator pSourceSetCreator,
                                             ISourceSetNameProvider pSourceSetNameProvider,
                                             IMappingPersistencePolicy pMappingPersistencePolicy,
                                             IAutoFixManager pAutoFixManager)
Constructor for this helper class, that allows more specialized creator and provider classes to be specified.
Parameters:
pInterface - The interface that the helper will modify.
pOdiInstance - Reference to the ODI instance that is currently open.
pOdiEntityManager - The entity manager that will be used to manage persistence.
pSourceSetComputer - The source set computer used to recompute the SourceSet object for the interface.
pSourceSetCreator - The source set creator used to create the SourceSet object for the interface.
pSourceSetNameProvider - The source set name provider used to generate source set names for the interface.
pMappingPersistencePolicy - Reference to an object which specifies persistence policy for the interface.
pAutoFixManager - Reference to an object which calculates and performs automated fixes for issues in the interface.

InteractiveInterfaceHelperWithActions

public InteractiveInterfaceHelperWithActions(OdiInterface pInterface,
                                             OdiInstance pOdiInstance,
                                             IOdiEntityManager pOdiEntityManager,
                                             ISourceSetComputer pSourceSetComputer,
                                             ISourceSetCreator pSourceSetCreator,
                                             ISourceSetNameProvider pSourceSetNameProvider,
                                             IMappingPersistencePolicy pMappingPersistencePolicy,
                                             IAutoFixManager pAutoFixManager,
                                             IInterfaceActionListener pActionListenerForChangesAtOpenTime)
Constructor for this helper class, that allows more specialized creator and provider classes to be specified.
Parameters:
pInterface - The interface that the helper will modify.
pOdiInstance - Reference to the ODI instance that is currently open.
pOdiEntityManager - The entity manager that will be used to manage persistence.
pSourceSetComputer - The source set computer used to recompute the SourceSet object for the interface.
pSourceSetCreator - The source set creator used to create the SourceSet object for the interface.
pSourceSetNameProvider - The source set name provider used to generate source set names for the interface.
pMappingPersistencePolicy - Reference to an object which specifies persistence policy for the interface.
pAutoFixManager - Reference to an object which calculates and performs automated fixes for issues in the interface.
pActionListenerForChangesAtOpenTime - An action listener instance that will be notified of interface changes.

InteractiveInterfaceHelperWithActions

public InteractiveInterfaceHelperWithActions(OdiInterface pInterface,
                                             OdiInstance pOdiInstance,
                                             IOdiEntityManager pOdiEntityManager,
                                             ISourceSetComputer pSourceSetComputer,
                                             ISourceSetCreator pSourceSetCreator,
                                             ISourceSetNameProvider pSourceSetNameProvider,
                                             IMappingPersistencePolicy pMappingPersistencePolicy,
                                             IAutoFixManager pAutoFixManager,
                                             IInterfaceActionListener pActionListenerForChangesAtOpenTime,
                                             boolean pGarbagedDestroyedObject)
A detailed constructor for this helper class, allowing for many specialized settings.
Parameters:
pInterface - The interface that the helper will modify.
pOdiInstance - Reference to the ODI instance that is currently open.
pOdiEntityManager - The entity manager that will be used to manage persistence.
pSourceSetComputer - The source set computer used to recompute the SourceSet object for the interface.
pSourceSetCreator - The source set creator used to create the SourceSet object for the interface.
pSourceSetNameProvider - The source set name provider used to generate source set names for the interface.
pMappingPersistencePolicy - Reference to an object which specifies persistence policy for the interface.
pAutoFixManager - Reference to an object which calculates and performs automated fixes for issues in the interface.
pActionListenerForChangesAtOpenTime - An action listener instance that will be notified of interface changes.
pGarbagedDestroyedObject - Unused.

Method Detail

checkAcceptsKMTechnologies

public static boolean checkAcceptsKMTechnologies(OdiKM<?> pOdiKM,
                                                 java.lang.Boolean pMultiConnection,
                                                 OdiTechnology pSourceTechnology,
                                                 OdiTechnology pTargetTechnology)
Returns true if the specified KM supports the given source and target technology, and multiple connection setting.
Parameters:
pOdiKM - The KM to check
pMultiConnection - The multiple connections allowed setting
pSourceTechnology - The source technology
pTargetTechnology - The target technology
Returns:
true if the KM is suitable for the corresponding source and target technologies, false otherwise

performAction

public IImpacts performAction(IInterfaceAction pAction)
                       throws UnknownActionException
Performs the specified action, using the default autofix manager that was provided when creating this InteractiveInterfaceHelperWithActions.
Specified by:
performAction in interface IInteractiveInterfaceHelperWithActions
Parameters:
pAction - The action interface instance to perform.
Returns:
an IImpacts object representing the modifications and undo actions
Throws:
VetoActionException - if the action couldn't be performed
UnknownActionException - this implementation doesn't throw this exception which can be safely caught

performAction

public IImpacts performAction(IInterfaceAction pAction,
                              IAutoFixManager pAutoFixManager)
                       throws UnknownActionException
Performs the specified action, and uses the specified auto fix manager to do automatic fixing of interface issues.
Specified by:
performAction in interface IInteractiveInterfaceHelperWithActions
Parameters:
pAction - The action interface instance to perform.
pAutoFixManager - The auto-fix manager instance used to fix issues.
Returns:
an IImpacts object representing the modifications and undo actions
Throws:
VetoActionException - if the action couldn't be performed
UnknownActionException - this implementation doesn't throw this exception which can be safely caught

computeExpression

public Expression computeExpression(java.lang.String pSql,
                                    IExecutableTextHolder pExecutableTextHolder,
                                    OdiInterface.ExecutionLocation pExecutionLocation,
                                    DataSet pDataSet)
For internal use only Computes the expression object of the specified SQL expression text for the given text holder in the desired data set and execution location.
Specified by:
computeExpression in interface IActionHelper
Parameters:
pSql - the SQL expression text
pExecutableTextHolder - the text holder to contain this expression
pExecutionLocation - the execution location for the expression
pDataSet - the parent data set for this expression
Returns:
the computed expression

computeExpression

public Expression computeExpression(java.lang.String pSql,
                                    OdiInterface.ExecutionLocation pExecutionLocation,
                                    DataSet pDataSet,
                                    IExpressionContext pExpressionContext)
This method computes an expression from a Sql text that would be executed on a DataSet and in the specified Location. It takes into account an additional expression context (for instance source datastores that would be added along with the expression so that the user can compute the expression before actually inserting the objects in the interface.
Parameters:
pSql - the text for which we want to compute cross-references
pExecutionLocation - the location on which this text would be executed
pDataSet - the dataset in which the text will be added
pExpressionContext - an additional expression context
Returns:
the expression for this text
Since:
11.1.1.5.0

refreshCrossReferences

public void refreshCrossReferences()
For internal use only Refresh the context manager for global and project references, and recompute all cross references.

getPhysicalSchema

public static OdiPhysicalSchema getPhysicalSchema(OdiLogicalSchema pLogicalSchema,
                                                  OdiContext pContext)
                                           throws InexistentMappingException
A static convenience method to return the associated physical schema for the specified logical schema, in the specified context.
Parameters:
pLogicalSchema - The logical schema, or null if no association is defined.
pContext - The context to use when finding the associated logical schema.
Returns:
A reference to the physical schema object.
Throws:
InexistentMappingException

getStagingAreaPhysicalSchema

public static OdiPhysicalSchema getStagingAreaPhysicalSchema(OdiInterface pInterface)
                                                      throws InexistentMappingException
A static convenience method to get the staging area physical schema for the specified interface.
Parameters:
pInterface - the interface
Returns:
The physical schema for the staging area.
Throws:
InexistentMappingException

getTargetDataStorePhysicalSchema

public static OdiPhysicalSchema getTargetDataStorePhysicalSchema(OdiInterface pInterface)
                                                          throws InexistentMappingException
A static convenience method to get the target datastore's physical schema for the specified interface.
Parameters:
pInterface - the interface
Returns:
The physical schema for the target data store
Throws:
InexistentMappingException - if the LogicalSchema and Context on the TargetDataStore do not point to any PhysicalSchema

getSourceDataStorePhysicalSchema

public static OdiPhysicalSchema getSourceDataStorePhysicalSchema(SourceDataStore pSourceDataStore)
                                                          throws InexistentMappingException
A static convenience method to retrieve the physical schema associated with the specified source data store.
Parameters:
pSourceDataStore - the source data store
Returns:
The physical schema for the source data store.
Throws:
InexistentMappingException

getLogicalSchemaForTextHolder

public static OdiLogicalSchema getLogicalSchemaForTextHolder(OdiInterface pOdiInterface,
                                                             IExecutableTextHolder pExecutableTextHolder)
A static convenience method to retrieve the logical schema associated with the specified text holder.
Parameters:
pOdiInterface - the interface
pExecutableTextHolder - the text holder to retrieve its logical schema
Returns:
The logical schema for the text holder.

checkSubInterfaceValid

public static void checkSubInterfaceValid(OdiInterface pSubInterface)
                                   throws InvalidSubInterfaceException
A static method to check for validity of a sub-interface.
Parameters:
pSubInterface - the interface
Throws:
InvalidSubInterfaceException - Throws this exception if the sub-interface is not valid.

isNativeSequenceInDerivedSelect

public static boolean isNativeSequenceInDerivedSelect(IInterfaceSubComponent pJoin)
used to check whether a derived sub-interfaces includes a native sequence or not
Parameters:
pJoin -
Returns:
true if a derived sub-interfaces includes a native sequence

computeSourceSets

public IImpacts computeSourceSets()
                           throws InexistentMappingException
Recomputes the SourceSet objects for the associated interface.
Should be called at some point after source data stores are added to or removed from the interface, or some mappings/joins/filters have been added or had their locations changed, to create the correct source sets.
Typically called before setting the KMs for the interface source set, or before calling preparePersist.
The current source set computer (which can be passed to the constructor for this helper instance) will be used to compute the source sets.
To know whether you should call this method, use areSourceSetsDirty().
Specified by:
computeSourceSets in interface IInteractiveInterfaceHelper
Returns:
an IImpacts object which represents the modifications and the undo actions
Throws:
InexistentMappingException - if some LogicalSchemas have no mapping for the current Context

getAllCurrentIssues

public java.util.Collection<IInterfaceIssue> getAllCurrentIssues()
Returns the current set of IInterfaceIssue objects associated with the interface. Calling this method may cause the issues to be computed, depending on whether it has already been called since the last changes were made to the interface.
Specified by:
getAllCurrentIssues in interface IInteractiveInterfaceHelper
Returns:
the current issues on the interface

getOdiInterface

public OdiInterface getOdiInterface()
Returns the interface associated with this helper.
Specified by:
getOdiInterface in interface IActionHelper
Specified by:
getOdiInterface in interface IInteractiveInterfaceHelper
Returns:
the interface associated with this helper

getCurrentIssues

public java.util.Collection<IInterfaceIssue> getCurrentIssues(IInterfaceSubComponent pSubComponent)
Returns the current set of IInterfaceIssue objects that are associated with the specified sub-component. Calling this method may cause the issues to be computed, depending on whether they have already been computed since the last change.
Specified by:
getCurrentIssues in interface IInteractiveInterfaceHelper
Parameters:
pSubComponent - The sub-component of the interface for which to retrieve issues
Returns:
the issues of this sub-component and his children

preparePersist

public void preparePersist()
                    throws OdiInterfaceNotReadyForPersistException
Called to inform the ODI persistence layer that this interface will be persisted. If this is not called, the interface will not be persisted. The ComputeSourceSets method should be called at some point before preparePersist is called.
Specified by:
preparePersist in interface IInteractiveInterfaceHelper
Throws:
OdiInterfaceNotReadyForPersistException - if the interface is not ready to be persisted

areSourceSetsDirty

public boolean areSourceSetsDirty()
Returns true if the source sets should be recomputed. The source sets will need to be recomputed if the relevant interface objects have been modified since the source sets were last computed.
Specified by:
areSourceSetsDirty in interface IInteractiveInterfaceHelper
Returns:
true if the method computeSourceSets() should be called

getReferenceManagerToDataStoreXRefs

public IReferenceManager getReferenceManagerToDataStoreXRefs()
Returns an IReferenceManager instance that can be used to get references to SourceDataStores from cross-references in expressions.
This implementation returns an instance of ReferenceManagerHeavyDataStores.
Specified by:
getReferenceManagerToDataStoreXRefs in interface IActionHelper
Returns:
an IReferenceManager instance that can be used to get references to SourceDataStores from cross-references in expressions

getReferenceManagerToDataStoreAttached

public IReferenceManager getReferenceManagerToDataStoreAttached()
Returns an IReferenceManager instance that can be used to get data store references from the interface, for attached data stores.
Attached data stores are those data stores that are indirectly associated with an interface object by a reference, for instance via Join.getAttachedDataStore1().
This implementation returns an instance of ReferenceManagerLightDataStores.
Specified by:
getReferenceManagerToDataStoreAttached in interface IActionHelper
Returns:
a reference manager giving references for attached source datastores

getReferenceManagerToSourceColumn

public IReferenceManager getReferenceManagerToSourceColumn()
Returns an IReferenceManager instance that can be used to get SourceColumn references from cross-references in the interface.
This implementation returns an instance of ReferenceManagerLookups.
Specified by:
getReferenceManagerToSourceColumn in interface IActionHelper
Returns:
a reference manager giving references to SourceColumns

getReferenceManagerToDataStoreFull

public IReferenceManager getReferenceManagerToDataStoreFull()
Returns an IReferenceManager instance that can be used to get data store references from the interface. This method returns all data store references, direct and indirect (i.e. it is the union of both cross-references and attached references).
This implementation returns an instance of ReferenceManagerToDataStoresFull.
Specified by:
getReferenceManagerToDataStoreFull in interface IActionHelper
Returns:
a reference manager giving all references to SourceDataStores

getLookupsManager

public ReferenceManagerLookups getLookupsManager()
Returns an IReferenceManager instance that can be used to get lookup references (i.e. lookup Join to its attached lookup SourceDataStore and vice-versa).
Specified by:
getLookupsManager in interface IActionHelper
Returns:
a reference manager that returns lookup references

getSourceSetCreator

public ISourceSetCreator getSourceSetCreator()
Returns the current ISourceSetCreator interface instance object that is used to create the source sets.
Specified by:
getSourceSetCreator in interface IActionHelper
Returns:
the ISourceSetCreator used to create source sets while computing source sets

getSourceSetNameProvider

public ISourceSetNameProvider getSourceSetNameProvider()
Returns the current ISourceSetNameProvider interface instance object that is used to generate source set names.
Specified by:
getSourceSetNameProvider in interface IActionHelper
Returns:
the ISourceSetNameProvider used to create names for the new source sets
See Also:
getSourceSetNameProvider()

getLanguageForTechnology

public static com.sunopsis.language.SnpsLanguage getLanguageForTechnology(OdiTechnology pTechnology,
                                                                          OdiInstance pOdiInstance)
A static convenience method to retrieve the SnpsLanguage object that is associated with the given technology.
Parameters:
pTechnology - The technology
pOdiInstance - The current open OdiInstance object.
Returns:
The default language for the given technology

getLanguageForTextHolder

public com.sunopsis.language.SnpsLanguage getLanguageForTextHolder(IExecutableTextHolder pExecutableTextHolder)
Retrieves the language for a specified IExecutableTextHolder object. The text holder contains a particular interface object that uses a language, for example a join or filter object.
Specified by:
getLanguageForTextHolder in interface IActionHelper
Parameters:
pExecutableTextHolder - The executable text holder
Returns:
the language in which this text holder should be computed

getMappingPersistencePolicy

public IMappingPersistencePolicy getMappingPersistencePolicy()
Returns the current IMappingPersistencePolicy object that is used to set the persistence policy for the interface mappings and target columns.
Specified by:
getMappingPersistencePolicy in interface IActionHelper
Returns:
the mapping persistence policy

getOdiInstance

public OdiInstance getOdiInstance()
Returns the current open OdiInstance object used to retrieve languages and global objects (Variables, Sequence, User functions).
Specified by:
getOdiInstance in interface IActionHelper
Returns:
the OdiInstance

getExecutionArea

public IExecutionArea getExecutionArea(IInterfaceSubComponent pInterfaceSubComponent)
                                throws InexistentMappingException
Returns the IExecutionArea interface instance that represents the location where the specified interface sub-component will be executed.
This is mainly for internal use.
Specified by:
getExecutionArea in interface IActionHelper
Parameters:
pInterfaceSubComponent - the sub-component
Returns:
the execution area in which this sub-component is located
Throws:
InexistentMappingException - if one LogicalSchema mapping is missing for the current Context

getExecutionAreas

public java.util.Collection<IExecutionArea> getExecutionAreas(DataSet pDataSet)
                                                       throws InexistentMappingException
Returns a collection of IExecutionArea instances that represent the locations where all interface sub-components belonging to the specified data set are located.
Specified by:
getExecutionAreas in interface IActionHelper
Parameters:
pDataSet - the data set for which we want the list of execution areas
Returns:
a collection of IExecutionArea which are the execution locations of interface sub-components
Throws:
InexistentMappingException - if one LogicalSchema mapping is missing for the current Context

chooseKM

public static OdiKM<?> chooseKM(OdiTechnology pSourceTechnology,
                                OdiTechnology pDestinationTechnology,
                                java.util.Collection<? extends OdiKM> pKMs)
Deprecated. Use chooseKM(String pProjectCode, final IOdiEntityManager pEntityManager, final OdiTechnology pSourceTechnology, final OdiTechnology pDestinationTechnology, Class pKMClass, boolean pMultiConnexion) instead
A static method used to pick a KM from among the available KMs.
The KM that is most suited to the specified source and destination technology will be picked.
The list of available KMs must be passed to the method.
Parameters:
pSourceTechnology - the source technology
pDestinationTechnology - the target technology
pKMs - all available KMs
Returns:
The best suiting KM from the list pKMs for the couple of technologies.

chooseKM

public static OdiKM<?> chooseKM(OdiTechnology pSourceTechnology,
                                OdiTechnology pDestinationTechnology,
                                java.util.Collection<? extends OdiKM> pKMs,
                                boolean pToFilter,
                                java.lang.Boolean pMultiConnexion)
Deprecated. Use chooseKM(String pProjectCode, final IOdiEntityManager pEntityManager, final OdiTechnology pSourceTechnology, final OdiTechnology pDestinationTechnology, Class pKMClass, boolean pMultiConnexion) instead
A static method used to pick a KM from among the available KMs. The KM that is most suited to the specified source and destination technology will be picked. The list of available KMs must be passed into the method.
Parameters:
pSourceTechnology - the source technology
pDestinationTechnology - the destination technology
pKMs - the list of available KMs
pToFilter - If true, then the list of available KMs will be filtered to only those that are allowed for the specified parameters.
pMultiConnexion - If true, then multiple connections will be allowed.
Returns:
The KM.

chooseKM

public static OdiKM<?> chooseKM(java.lang.String pProjectCode,
                                IOdiEntityManager pEntityManager,
                                OdiTechnology pSourceTechnology,
                                OdiTechnology pDestinationTechnology,
                                java.lang.Class pKMClass,
                                boolean pMultiConnexion)
A static method used to pick a KM from among the available KMs. The KM that is most suited to the specified source and destination technology will be picked. The list of available KMs must be passed into the method.
Parameters:
pProjectCode - the project code in which we want to look for KMs
pEntityManager - the entity manager to use to find KMs
pSourceTechnology - the source technology
pDestinationTechnology - the destination technology
pKMClass - the KM class we wish to have
pMultiConnexion - If true, then multiple connections will be allowed.
Returns:
The KM.

getContextManager

public ContextManager getContextManager()
Returns the context manager for this helper.
Returns:
the context manager

computeExecutionLocationForDatastores

public static OdiInterface.ExecutionLocation computeExecutionLocationForDatastores(SourceDataStore pSrcDataStore1,
                                                                                   SourceDataStore pSrcDataStore2)
For internal use only Computes the default exection location of an expression between two specfied data stores.
Parameters:
pSrcDataStore1 - the source data store
pSrcDataStore2 - the target data store
Returns:
The execution location for the specified data stores.

getEntityManager

public IOdiEntityManager getEntityManager()
Return the IOdiEntityManager instance that is used to control object persistence and synchronization for this helper.
Specified by:
getEntityManager in interface IActionHelper
Returns:
the entity manager used to persist this interface
See Also:
IActionHelper.getEntityManager()

removeTargetMapping

public void removeTargetMapping(TargetMapping pMapping)
For internal use only Remove the specified targe tmapping.
Specified by:
removeTargetMapping in interface IActionHelper
Parameters:
pMapping - the target mapping to be removed
See Also:
IActionHelper.removeTargetMapping(oracle.odi.domain.project.interfaces.TargetMapping)

createTargetMapping

public TargetMapping createTargetMapping(DataSet pDataSet,
                                         TargetColumn pColumn,
                                         OdiInterface.ExecutionLocation pLocation,
                                         java.lang.Object pText)
For internal use only Create a new target mapping. //FIXME temporary fix for bug 8415148
Specified by:
createTargetMapping in interface IActionHelper
Parameters:
pDataSet - the data set of this new target mapping
pColumn - the column of this new target mapping
pLocation - the execution location of this new target mapping
pText - the expression of this new target mapping
Returns:
the TargetMapping object for this new target mapping
See Also:
IActionHelper.createTargetMapping(oracle.odi.domain.project.interfaces.DataSet, oracle.odi.domain.project.interfaces.TargetColumn, oracle.odi.domain.project.OdiInterface.ExecutionLocation, java.lang.Object)

performRefreshDataStores

public void performRefreshDataStores()
Refresh TargetDataStore and SourceDataStore, according to update done on the underlying datastore. Can be called to synchronize the source or target data store in the interface with changes made to the OdiDataStore object in the ODI repository.

getMissingRefsManager

public com.sunopsis.versioning.SnpsMissingRefsManager getMissingRefsManager()
Description copied from interface: IActionHelper
Returns the missing references manager for this helper. It contains all missing references for all objects of this interface.
Specified by:
getMissingRefsManager in interface IActionHelper
Returns:
the SnpsMissingRefsManager object

Skip navigation links

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

E17060-04


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