Skip navigation links

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

E17060-04


oracle.odi.domain.project
Class OdiUserProcedure

java.lang.Object
  extended by oracle.odi.domain.support.BusinessObject
      extended by oracle.odi.domain.support.AbstractRepositoryEntity
          extended by oracle.odi.domain.support.AbstractOdiEntity
              extended by oracle.odi.domain.project.OdiProcedure<OdiUserProcedureLine>
                  extended by oracle.odi.domain.project.OdiUserProcedure

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, oracle.odi.core.audit.support.IAuditableFirstClassObject, IFlexFieldUser, IExportable, IOdiEntity, IRepositoryEntity, IWorkDevelopmentOdiEntity, oracle.odi.domain.procusage.IProcedureUser, IOdiScenarioSource, IOdiShortcutable<OdiUserProcedure>, ISmartExportable

public final class OdiUserProcedure
extends OdiProcedure<OdiUserProcedureLine>
implements IOdiShortcutable<OdiUserProcedure>, IOdiScenarioSource, IExportable, oracle.odi.domain.procusage.IProcedureUser, ISmartExportable, oracle.odi.core.audit.support.IAuditableFirstClassObject

Represents the ODI user procedures.

An OdiUserProcedure is a set of commands that can be executed by an agent. These commands concern all technologies accessible by Oracle Data Integrator (OS, JDBC, JMS commands, etc).

If an OdiUserProcedure is constructed with a reference object, the OdiUserProcedure will represented a shortcut to the reference object. When an OdiUserProcedure is used as a shortcut, most properties are accessed through the base object. The IOdiShortcutable interface implemented by OdiInterface provides access and control over the shortcut aspects of this object.

Instances of OdiUserProcedure follow same life cycle as defined in OdiProcedure class with the following additions:

An OdiUserProcedure is dedicated to a single OdiProject and is located inside an OdiFolder. Thus, life cycle of an OdiUserProcedure begin when it is created from an OdiFolder using OdiFolder#addUserProcedure(String name) method, or when an OdiUserProcedure is imported from an XML file.

Life cycle ends when enclosing OdiProject or OdiFolder is removed from design time repository. An instance of OdiUserProcedure can be generated into an OdiScenario and implements the interface IOdiScenarioSource for this purpose. Also, an instance of OdiUserProcedure can be exported and imported. It implements the interface IExportable.

OdiUserProcedureClass class is defined to only use OdiUserProcedureLineLine as ProcedureLine.

Since:
11.1.1.3.0
See Also:
Serialized Form

Field Summary

 

Fields inherited from class oracle.odi.domain.project.OdiProcedure
NAME_MAX_LENGTH

 

Fields inherited from class oracle.odi.domain.support.AbstractOdiEntity
STARTING_INTERNAL_VERSION

 

Constructor Summary
OdiUserProcedure(OdiFolder pFolder, java.lang.String pName)
          Constructor that sets the parent OdiFolder and the name of this OdiUserProcedure instance.
OdiUserProcedure(OdiFolder pFolder, java.lang.String pName, OdiUserProcedure pReferenceUserProcedure)
          Constructor that sets the parentFolder, the name of the user procedure, and the reference user procedure.

 

Method Summary
 OdiUserProcedureLine addLine(java.lang.String pName, OdiProcedureLineCmd pTargetCommand, OdiProcedureLineCmd pSourceCommand, java.util.Collection<ProcedureOption> pGenerationConditions)
          Adds (assigning it the latest position) a new OdiProcedureLine with the given name, the given target and source commands (possibly nulls) and options (possibly null) that will condition the generation of the line.
 ProcedureOption addOption(java.lang.String pOptionName)
          Adds (assigning it the lastest position) a new ProcedureOption with the given name and default OptionType to this OdiProcedure.
 ProcedureOption addOption(java.lang.String pOptionName, ProcedureOption.OptionType pType, java.lang.Object pDefaultValue)
          Adds (assigning it the lastest position) a new ProcedureOption of the given type, default value and with the given name to this OdiProcedure.
 boolean changeShortcutReferenceObject(OdiUserProcedure pReferenceObject)
          Change the shortcut reference object.
 void checkValidReference(OdiUserProcedure pReferenceObject)
          Internal Use Only
 java.util.Collection<IOptionValue> getExecutionOptions()
          Obtains an unmodifiable collection of options defined for the design time execution of this OdiUserProcedure.
 OdiFolder getFolder()
          Return the parent OdiFolder.
 java.lang.Number getInstanceId()
           
 java.util.List<OdiUserProcedureLine> getLines()
          Returns an unmodifiable list of OdiProcedureLines held by this OdiProcedure.
 ProcedureOption getOption(java.lang.String pName)
          Retrieves the procedure option which name is the parameter name.
 java.util.Collection<java.lang.String> getOptionNames()
          Returns a collection of names of all this procedure's options.
 java.util.List<ProcedureOption> getOptions()
          Returns an unmodifable list of ProcedureOptions held by this OdiProcedure.
 OdiUserProcedure getRealObject()
          Return the real object associated with this object.
 IReleaseTag getReleaseTag()
          Return the release tag for this object.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 OdiUserProcedure getShortcutBaseObject()
          Return the base object of this shortcutable.
 OdiUserProcedure getShortcutOrigObject()
          If this is a shortcut, return the original base object
 OdiUserProcedure getShortcutReferenceObject()
          If this is a shortcut, return the reference object.
 boolean isInstanceLevelSecurityNeeded()
          Internal: this method is for internal purpose and must not be considered as part of the public API.
 boolean isMultiConnectionSupported()
          Return whether this OdiProcedure supports mulitConnection or not.
 boolean isShortcut()
          Returns true if this object is a shortcut.
 void moveLineAfter(OdiUserProcedureLine pSource, OdiUserProcedureLine pAfter)
          Moves the given OdiProcedureLine after the line specified.
 void moveLineBefore(OdiUserProcedureLine pSource, OdiUserProcedureLine pBefore)
          Moves the given Procedure Moves the given OdiProcedureLine before the line specified.
 void removeLine(OdiUserProcedureLine pLine)
          Removes the given line from this OdiProcedure.
 void removeOption(ProcedureOption pOption)
          Remove the specified option from this procedure.
 void setDefaultSourceTechnology(OdiTechnology pTechnology)
          Sets the default source technology of this OdiProcedure.
 void setDefaultTargetTechnology(OdiTechnology pTechnology)
          Sets the default target technology.
 void setMultiConnectionSupported(boolean pMultiConnectionSupported)
          Defines whether this OdiProcedure supports mulitConnection or not.
 boolean setShortcutBaseObject(OdiUserProcedure pBaseObject)
          Internal Use Only.
 boolean setShortcutReferenceObject(OdiUserProcedure pReferenceObject)
          Internal Use Only.

 

Methods inherited from class oracle.odi.domain.project.OdiProcedure
addLine, getDefaultSourceTechnology, getDefaultTargetTechnology, getDescription, getFlexFieldsValues, getInternalId, getName, getProcedureId, initFlexFields, setDescription, setName

 

Methods inherited from class oracle.odi.domain.support.AbstractOdiEntity
equals, getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, hashCode, 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

 

Constructor Detail

OdiUserProcedure

public OdiUserProcedure(OdiFolder pFolder,
                        java.lang.String pName,
                        OdiUserProcedure pReferenceUserProcedure)
Constructor that sets the parentFolder, the name of the user procedure, and the reference user procedure. If pReferenceUserProcedure is not null, this object will is a user procedure shortcut.
Parameters:
pFolder - owning folder
pName - name of OdiUserProcedure
pReferenceUserProcedure - The reference datastore for this datastore shortcut.
Throws:
DomainRuntimeException - if the folder is null or if the name is null, empty or longer than NAME_MAX_LENGTH (400 characters)
See Also:
OdiFolder

OdiUserProcedure

public OdiUserProcedure(OdiFolder pFolder,
                        java.lang.String pName)
Constructor that sets the parent OdiFolder and the name of this OdiUserProcedure instance.
Parameters:
pFolder - owning folder
pName - name of OdiUserProcedure
Throws:
DomainRuntimeException - if the folder is null or if the name is null, empty or longer than NAME_MAX_LENGTH (400 characters)
See Also:
OdiFolder

Method Detail

getSecurityContainer

public IRepositoryEntity getSecurityContainer()
Description copied from interface: IRepositoryEntity
Define a generic way to retrieve container for entities.
Specified by:
getSecurityContainer in interface IRepositoryEntity
Overrides:
getSecurityContainer in class OdiProcedure<OdiUserProcedureLine>
Returns:
container entity

getFolder

public OdiFolder getFolder()
Return the parent OdiFolder.
Returns:
OdiFolder
See Also:
OdiFolder, setFolder(OdiFolder)

isInstanceLevelSecurityNeeded

public boolean isInstanceLevelSecurityNeeded()
Description copied from interface: IOdiEntity
Internal: this method is for internal purpose and must not be considered as part of the public API.

Defines a method to capture the info on which object needs instance level privilege.

Specified by:
isInstanceLevelSecurityNeeded in interface IOdiEntity
Overrides:
isInstanceLevelSecurityNeeded in class oracle.odi.domain.support.AbstractOdiEntity
Returns:
true if instance level security needed, false otherwise

getExecutionOptions

public java.util.Collection<IOptionValue> getExecutionOptions()
Obtains an unmodifiable collection of options defined for the design time execution of this OdiUserProcedure.
Returns:
a Collection object representing the execution options value
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.

getInstanceId

public java.lang.Number getInstanceId()
Specified by:
getInstanceId in interface oracle.odi.domain.procusage.IProcedureUser

getShortcutBaseObject

public OdiUserProcedure getShortcutBaseObject()
Description copied from interface: IOdiShortcutable
Return the base object of this shortcutable.

This will return null if the object never has been a shortcut. If this object is a materialized shortcut, the base object will be the base object at the time that this was shortcuted.

Specified by:
getShortcutBaseObject in interface IOdiShortcutable<OdiUserProcedure>
Returns:
T base object of this shortcut.

setShortcutBaseObject

public boolean setShortcutBaseObject(OdiUserProcedure pBaseObject)
Description copied from interface: IOdiShortcutable
Internal Use Only. Set the base object of this shortcutable.

If the base object is changed, we should correct all consumers of this object.
This method may be called from a precedent shortcut object in the shortcut chain and the precedent shortcut obejct is removed or materialized.

Specified by:
setShortcutBaseObject in interface IOdiShortcutable<OdiUserProcedure>
Parameters:
pBaseObject - new base object.
Returns:
true if this object was actually modified, else return false.

getShortcutReferenceObject

public OdiUserProcedure getShortcutReferenceObject()
Description copied from interface: IOdiShortcutable
If this is a shortcut, return the reference object.

The reference object may also be a shortcut.

Specified by:
getShortcutReferenceObject in interface IOdiShortcutable<OdiUserProcedure>
Returns:
T reference object of this shortcut.

setShortcutReferenceObject

public boolean setShortcutReferenceObject(OdiUserProcedure pReferenceObject)
Description copied from interface: IOdiShortcutable
Internal Use Only. Set reference of this shortcut.

If pShortcutable is null, set pReference to null. This is no longer a shortcut.
If pShortcutable is not null, set the reference object to pShortcutable, set the base object to pShortcutable.getBaseObject.
This method may be called from a precedent shortcut object in the shortcut chain and the precedent shortcut obejct is removed or materialized.

Specified by:
setShortcutReferenceObject in interface IOdiShortcutable<OdiUserProcedure>
Parameters:
pReferenceObject - new shortcutable object. Can be be null
Returns:
true if this object was actually modified. Else return false;

getShortcutOrigObject

public OdiUserProcedure getShortcutOrigObject()
Description copied from interface: IOdiShortcutable
If this is a shortcut, return the original base object

The reference object may also be a shortcut.

Specified by:
getShortcutOrigObject in interface IOdiShortcutable<OdiUserProcedure>
Returns:
T reference object of this shortcut.

getReleaseTag

public IReleaseTag getReleaseTag()
Description copied from interface: IOdiShortcutable
Return the release tag for this object.

release tag is actually maintained on the container object. This provides consistent access to the tag.

Specified by:
getReleaseTag in interface IOdiShortcutable<OdiUserProcedure>
Returns:
Release tag of container object.

isShortcut

public boolean isShortcut()
Description copied from interface: IOdiShortcutable
Returns true if this object is a shortcut.
Specified by:
isShortcut in interface IOdiShortcutable<OdiUserProcedure>
Returns:
true if this object is a shortcut. Else return false.

getRealObject

public OdiUserProcedure getRealObject()
Description copied from interface: IOdiShortcutable
Return the real object associated with this object.

This is a convenience function to obtain the real object of a shortcutable object. If this object is a shortcut, return the base obejct. If this object is not a shortcut, return this object.

Specified by:
getRealObject in interface IOdiShortcutable<OdiUserProcedure>
Returns:
Real object. The real object could be either this object or the base object.

checkValidReference

public void checkValidReference(OdiUserProcedure pReferenceObject)
Description copied from interface: IOdiShortcutable
Internal Use Only
Specified by:
checkValidReference in interface IOdiShortcutable<OdiUserProcedure>

changeShortcutReferenceObject

public boolean changeShortcutReferenceObject(OdiUserProcedure pReferenceObject)
Description copied from interface: IOdiShortcutable
Change the shortcut reference object. The current object must be shortcut.

If pReferenceObject's base object is same as the base object of shortcut, the shortcut will have pReferenceObject as new reference. It will return true.
If pReferenceObject's base object is not same as the base of the shortcut, the shortcut reference object won't be changed. It will return false.
If pReferenceObject is null, the shortcut reference object won't be changed. It will return false.
If current object is not shortcut, nothing will be changed. It will return false.

Specified by:
changeShortcutReferenceObject in interface IOdiShortcutable<OdiUserProcedure>
Parameters:
pReferenceObject - new reference object. Can be be null
Returns:
true if this object was actually modified. Else return false;

getOption

public ProcedureOption getOption(java.lang.String pName)
Description copied from class: OdiProcedure
Retrieves the procedure option which name is the parameter name.
Overrides:
getOption in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pName - the name of the option
Returns:
the ProcedureOption matching the given name
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.
See Also:
OdiProcedure.addOption(ProcedureOption)

getOptionNames

public java.util.Collection<java.lang.String> getOptionNames()
Description copied from class: OdiProcedure
Returns a collection of names of all this procedure's options.
Overrides:
getOptionNames in class OdiProcedure<OdiUserProcedureLine>
Returns:
a Collection object representing the option names
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.
See Also:
OdiProcedure.getOptions(), OdiProcedure.getOption(String)

getOptions

public java.util.List<ProcedureOption> getOptions()
Description copied from class: OdiProcedure
Returns an unmodifable list of ProcedureOptions held by this OdiProcedure.

The obtained list is ordered by option's positions.

Note that list's indexes and options positions are consistent by not equals since the position of a ProcedureOption can be changed manually from ProcedureOption#setPosition(int). Also, when a ProcedureOption's position is changed, the obtained list is not consistent anymore with the new position.

Overrides:
getOptions in class OdiProcedure<OdiUserProcedureLine>
Returns:
List of ProcedureOption
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.
See Also:
OdiProcedure.addOption(ProcedureOption), OdiProcedure.getOption(String)

addOption

public ProcedureOption addOption(java.lang.String pOptionName)
Description copied from class: OdiProcedure
Adds (assigning it the lastest position) a new ProcedureOption with the given name and default OptionType to this OdiProcedure.
Overrides:
addOption in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pOptionName - option name
Returns:
the newly created ProcedureOption.
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.

addOption

public ProcedureOption addOption(java.lang.String pOptionName,
                                 ProcedureOption.OptionType pType,
                                 java.lang.Object pDefaultValue)
Description copied from class: OdiProcedure
Adds (assigning it the lastest position) a new ProcedureOption of the given type, default value and with the given name to this OdiProcedure.
Overrides:
addOption in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pOptionName - Name of option.
pType - Option type
pDefaultValue - Default value
Returns:
the newly created ProcedureOption.
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.

removeOption

public void removeOption(ProcedureOption pOption)
Description copied from class: OdiProcedure
Remove the specified option from this procedure.

The option is also removed from any OdiProcedureLine's generation condition.

Overrides:
removeOption in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pOption - the option to remove
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.

setDefaultSourceTechnology

public void setDefaultSourceTechnology(OdiTechnology pTechnology)
Description copied from class: OdiProcedure
Sets the default source technology of this OdiProcedure.

Mainly used inside ODI Studio when creating commands.

By default this property is set to null.

Overrides:
setDefaultSourceTechnology in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pTechnology - the default source technology
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.
See Also:
OdiProcedure.getDefaultSourceTechnology()

setDefaultTargetTechnology

public void setDefaultTargetTechnology(OdiTechnology pTechnology)
Description copied from class: OdiProcedure
Sets the default target technology.

Mainly used inside ODI Studio when creating commands.

By default this property is set to null.

Overrides:
setDefaultTargetTechnology in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pTechnology - the default target technology
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.
See Also:
OdiProcedure.getDefaultTargetTechnology()

addLine

public OdiUserProcedureLine addLine(java.lang.String pName,
                                    OdiProcedureLineCmd pTargetCommand,
                                    OdiProcedureLineCmd pSourceCommand,
                                    java.util.Collection<ProcedureOption> pGenerationConditions)
Description copied from class: OdiProcedure
Adds (assigning it the latest position) a new OdiProcedureLine with the given name, the given target and source commands (possibly nulls) and options (possibly null) that will condition the generation of the line. Other OdiProcedureLine properties are made default.
Overrides:
addLine in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pName - Name of line.
pTargetCommand - target command, or null
pSourceCommand - source command, or null
pGenerationConditions - conditions, or null
Returns:
the newly created OdiProcedureLine
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.

getLines

public java.util.List<OdiUserProcedureLine> getLines()
Description copied from class: OdiProcedure
Returns an unmodifiable list of OdiProcedureLines held by this OdiProcedure. The obtained list is ordered according to the execution / generation order.
Overrides:
getLines in class OdiProcedure<OdiUserProcedureLine>
Returns:
List of lines.
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.

moveLineAfter

public void moveLineAfter(OdiUserProcedureLine pSource,
                          OdiUserProcedureLine pAfter)
Description copied from class: OdiProcedure
Moves the given OdiProcedureLine after the line specified. This will internally rearrange OdiProcedureLines accordingly.
Overrides:
moveLineAfter in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pSource - source line
pAfter - move source line after this line
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.

moveLineBefore

public void moveLineBefore(OdiUserProcedureLine pSource,
                           OdiUserProcedureLine pBefore)
Description copied from class: OdiProcedure
Moves the given Procedure Moves the given OdiProcedureLine before the line specified. This will internally rearrange OdiProcedureLines accordingly.
Overrides:
moveLineBefore in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pSource - source line
pBefore - move source line before this line
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.

removeLine

public void removeLine(OdiUserProcedureLine pLine)
Description copied from class: OdiProcedure
Removes the given line from this OdiProcedure.
Overrides:
removeLine in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pLine - line to be removed
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.

setMultiConnectionSupported

public void setMultiConnectionSupported(boolean pMultiConnectionSupported)
Description copied from class: OdiProcedure
Defines whether this OdiProcedure supports mulitConnection or not. Mainly used by ODI Studio to determine best-suited procedures.

Setting this will affect source technology. If set to false, source technology will be set to null.

Overrides:
setMultiConnectionSupported in class OdiProcedure<OdiUserProcedureLine>
Parameters:
pMultiConnectionSupported - true to make this procedure supports mutliConnection, false otherwise
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.
See Also:
OdiProcedure.isMultiConnectionSupported()

isMultiConnectionSupported

public boolean isMultiConnectionSupported()
Description copied from class: OdiProcedure
Return whether this OdiProcedure supports mulitConnection or not. Mainly used by ODI Studio to determine best-suited procedures
Overrides:
isMultiConnectionSupported in class OdiProcedure<OdiUserProcedureLine>
Returns:
true if the procedure supports mutliConnection, false otherwise
Throws:
java.lang.IllegalStateException - if this is a shortcut. Use getRealObject to access.
See Also:
OdiProcedure.setMultiConnectionSupported(boolean)

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.