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

E17060-01

oracle.odi.domain.project
Class OdiProcedure<L extends OdiProcedureLine>

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<L>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IOdiEntity, IRepositoryEntity, IWorkDevelopmentOdiEntity
Direct Known Subclasses:
OdiKM, OdiUserProcedure

public abstract class OdiProcedure<L extends OdiProcedureLine>
extends oracle.odi.domain.support.AbstractOdiEntity
implements IWorkDevelopmentOdiEntity

Abstract high-level object encompassing ODI User Procedures and ODI Knowledge Modules.

OdiProcedure is an abstract class that doesn't represent any actual ODI concept. However, it manages commons requirements, of both OdiUserProcedure and OdiKM (and its subclasses). As such, it provides getter and setter methods for commons properties like name and description. It also provides the notion of defaultTargetTechnology and defaultSourceTechnology, as well as a multiConnectionSupported indicator telling whether the OdiProcedure instance is able to deal with a target DataServer and a source DataServer, or not. Those properties are used during ODI Interface design to assist users by giving it a choice between most appropriates KMs.

An OdiProcedure also provides methods to manage OdiProcedureLines and ProcedureOptions. OdiProcedure is the root entity of the OdiProcedure - OdiProcedureLine - OdiProcedureLineCmd - ProcedureOption aggregate. Thus an instance of OdiProcedure controls life cycle of every instances from this aggregate that belongs to it and provides auditing information about this aggregate. As such, it implements the IOdiEntity interface.

An OdiProcedure has an ID that can be obtained from getProcedureId() method call. This ID is assigned when an OdiProcedure is stored into design time repository. This ID represents the identity of an OdiProcedure. Equals / hashCode method are implemented according this identity.

An OdiProcedure life cycle begins when a user create a concrete implementation such as OdiUserProcedure or OdiKM. It is then typically stored inside ODI design time repository. The users can modify it in order to make it fit their needs. Life cycle ends when a user deletes the concrete implementation from design time repository (i.e. using IOdiEntityManager.remove ()).

Since:
11.1.1.3.0
See Also:
OdiKM, OdiUserProcedure, Serialized Form

Field Summary
static int NAME_MAX_LENGTH
          Maximum length of an Odi Procedure's name.
 
Fields inherited from class oracle.odi.domain.support.AbstractOdiEntity
STARTING_INTERNAL_VERSION
 
Method Summary
 L addLine(java.lang.String pName)
          Adds (assigning it the latest position) a new OdiProcedureLine with the given name and default properties.
 L 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.
 OdiTechnology getDefaultSourceTechnology()
          Gets the default source technology of this OdiProcedure.
 OdiTechnology getDefaultTargetTechnology()
          Gets the default target technology of this OdiProcedure.
 java.lang.String getDescription()
          Returns the description of the procedure.
 java.io.Serializable getInternalId()
          Return the internal id of the procedure.
 java.util.List<L> getLines()
          Returns an unmodifiable list of OdiProcedureLines held by this OdiProcedure.
 java.lang.String getName()
          Returns the name of the procedure.
 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.
 java.lang.Number getProcedureId()
          Return the procedure identifier.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 boolean isMultiConnectionSupported()
          Return whether this OdiProcedure supports mulitConnection or not.
 void moveLineAfter(L pSource, L pAfter)
          Moves the given OdiProcedureLine after the line specified.
 void moveLineBefore(L pSource, L pBefore)
          Moves the given Procedure Moves the given OdiProcedureLine before the line specified.
 void removeLine(L 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 setDescription(java.lang.String pDescription)
          Sets the description of the procedure.
 void setMultiConnectionSupported(boolean pMultiConnectionSupported)
          Defines whether this OdiProcedure supports mulitConnection or not.
 void setName(java.lang.String pName)
          Sets the name of the procedure.
 
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

NAME_MAX_LENGTH

public static final int NAME_MAX_LENGTH
Maximum length of an Odi Procedure's name.

See Also:
Constant Field Values
Method Detail

addLine

public final L addLine(java.lang.String pName)
Adds (assigning it the latest position) a new OdiProcedureLine with the given name and default properties.

Parameters:
pName - Name of line.
Returns:
the newly created OdiProcedureLine
Throws:
java.lang.IllegalArgumentException - if the parameter is null or empty.

addLine

public final L 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. Other OdiProcedureLine properties are made default.

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.IllegalArgumentException - if the name is null or empty.

addOption

public final 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.

Parameters:
pOptionName - option name
Returns:
the newly created ProcedureOption.
Throws:
java.lang.IllegalArgumentException - if name is null or empty or if option already exists

addOption

public final 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.

Parameters:
pOptionName - Name of option.
pType - Option type
pDefaultValue - Default value
Returns:
the newly created ProcedureOption.

getDefaultSourceTechnology

public OdiTechnology getDefaultSourceTechnology()
Gets the default source technology of this OdiProcedure.

Returns:
default source technology
Throws:
java.lang.IllegalStateException - if multi connections are not supported
See Also:
setDefaultSourceTechnology(oracle.odi.domain.topology.OdiTechnology)

getDefaultTargetTechnology

public OdiTechnology getDefaultTargetTechnology()
Gets the default target technology of this OdiProcedure.

Returns:
default target technology
See Also:
setDefaultTargetTechnology(oracle.odi.domain.topology.OdiTechnology)

getDescription

public java.lang.String getDescription()
Returns the description of the procedure.

Returns:
a String representing the description value
See Also:
setDescription(String)

getInternalId

public java.io.Serializable getInternalId()
Return the internal id of the procedure.

Specified by:
getInternalId in interface IRepositoryEntity
Returns:
the persistence identity of this instance
See Also:
getProcedureId()

getLines

public java.util.List<L> getLines()
Returns an unmodifiable list of OdiProcedureLines held by this OdiProcedure. The obtained list is ordered according to the execution / generation order.

Returns:
List of lines.

getName

public java.lang.String getName()
Returns the name of the procedure.

Specified by:
getName in interface IOdiEntity
Overrides:
getName in class oracle.odi.domain.support.AbstractOdiEntity
Returns:
the name
See Also:
setName(String)

getOption

public ProcedureOption getOption(java.lang.String pName)
Retrieves the procedure option which name is the parameter name.

Parameters:
pName - the name of the option
Returns:
the ProcedureOption matching the given name
See Also:
addOption(ProcedureOption)

getOptionNames

public java.util.Collection<java.lang.String> getOptionNames()
Returns a collection of names of all this procedure's options.

Returns:
a Collection object representing the option names
See Also:
getOptions(), getOption(String)

getOptions

public java.util.List<ProcedureOption> getOptions()
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.

Returns:
List of ProcedureOption
See Also:
addOption(ProcedureOption), getOption(String)

getProcedureId

public java.lang.Number getProcedureId()
Return the procedure identifier.

Returns:
a Number object representing the procedure id value

getSecurityContainer

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

Specified by:
getSecurityContainer in interface IRepositoryEntity
Returns:
container entity

isMultiConnectionSupported

public boolean isMultiConnectionSupported()
Return whether this OdiProcedure supports mulitConnection or not. Mainly used by ODI Studio to determine best-suited procedures

Returns:
true if the procedure supports mutliConnection, false otherwise
See Also:
setMultiConnectionSupported(boolean)

moveLineAfter

public void moveLineAfter(L pSource,
                          L pAfter)
Moves the given OdiProcedureLine after the line specified. This will internally rearrange OdiProcedureLines accordingly.

Parameters:
pSource - source line
pAfter - move source line after this line
Throws:
java.lang.IllegalArgumentException - if source or after do not belong to this OdiProcedure

moveLineBefore

public void moveLineBefore(L pSource,
                           L pBefore)
Moves the given Procedure Moves the given OdiProcedureLine before the line specified. This will internally rearrange OdiProcedureLines accordingly.

Parameters:
pSource - source line
pBefore - move source line before this line
Throws:
java.lang.IllegalArgumentException - if source or after do not belong to this OdiProcedure

removeLine

public void removeLine(L pLine)
Removes the given line from this OdiProcedure.

Parameters:
pLine - line to be removed
Throws:
java.lang.IllegalArgumentException - if the given line is null or does not belong to this OdiProcedure.

removeOption

public void removeOption(ProcedureOption pOption)
Remove the specified option from this procedure.

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

Parameters:
pOption - the option to remove
Throws:
java.lang.IllegalArgumentException - if the parameter is null or not associated to this procedure.

setDefaultSourceTechnology

public void setDefaultSourceTechnology(OdiTechnology pTechnology)
Sets the default source technology of this OdiProcedure.

Mainly used inside ODI Studio when creating commands.

By default this property is set to null.

Parameters:
pTechnology - the default source technology
Throws:
java.lang.IllegalStateException - if multi connections are not supported
See Also:
getDefaultSourceTechnology()

setDefaultTargetTechnology

public void setDefaultTargetTechnology(OdiTechnology pTechnology)
Sets the default target technology.

Mainly used inside ODI Studio when creating commands.

By default this property is set to null.

Parameters:
pTechnology - the default target technology
See Also:
getDefaultTargetTechnology()

setDescription

public void setDescription(java.lang.String pDescription)
Sets the description of the procedure.

Parameters:
pDescription - the description
See Also:
getDescription()

setMultiConnectionSupported

public void setMultiConnectionSupported(boolean pMultiConnectionSupported)
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.

Parameters:
pMultiConnectionSupported - true to make this procedure supports mutliConnection, false otherwise
See Also:
isMultiConnectionSupported()

setName

public void setName(java.lang.String pName)
Sets the name of the procedure. Can't be null or empty. Name must be 400 characters long max.

Parameters:
pName - the procedure name
Throws:
java.lang.IllegalArgumentException - if the name is invalid.
See Also:
getName()

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.