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

E17060-01

oracle.odi.domain.project
Class OdiProcedureLine

java.lang.Object
  extended by oracle.odi.domain.support.BusinessObject
      extended by oracle.odi.domain.support.AbstractRepositoryEntity
          extended by oracle.odi.domain.project.OdiProcedureLine
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IRepositoryEntity
Direct Known Subclasses:
OdiCKMLine, OdiIKMLine, OdiJKMLine, OdiLKMLine, OdiRKMLine, OdiUserProcedureLine

public abstract class OdiProcedureLine
extends oracle.odi.domain.support.AbstractRepositoryEntity

An OdiProcedureLine holds metadata about a task to be executed by ODI Execution Engine. Those metadata are about logging, generation conditions and actual commands to be executed on the target and / or the source connection.

An OdiProcedureLine is an entity managed within the OdiProcedure, OdiProcedureLine, OdiProcedureLineCmd, ProcedureOption aggregate.

An OdiProcedureLine has an ID (OdiProcedureLineId) that can be obtained from getProcedureLineId() method call. This ID is assigned when an OdiProcedure is stored into design time repository.

This ID represents the identity of an OdiProcedureLine. Equals / hashCode method are implemented according this identity.

The life cycle of an OdiProcedureLine start when it is created and added to the OdiProcedure it belongs. The user can then manipulate it and properties can be defined to fit user requirements: define logging to be applied when executed, target and / or source commands, etc. In order to change a OdiProcedureLine order (i.e. to move it), this has to be done from the OdiProcedure this OdiProcedureLine belongs.

OdiProcedure provides methods for that purpose. The life cycle ends when the OdiProcedureLine is removed from the OdiProcedure it belongs, or when the OdiProcedure owning the OdiProcedureLine is deleted.

Since:
11.1.1.3.0
See Also:
Serialized Form

Nested Class Summary
static class OdiProcedureLine.LogCounter
          Internal Enum that represents the different log counter type an OdiProcedureLine can use.
static class OdiProcedureLine.OdiProcedureLineId
          An OdiProcedureLineId represents the identity of an OdiProcedureLine object.
 
Field Summary
static int NAME_MAX_LENGTH
          Maximum length of an OdiProcedureLine name.
 
Method Summary
 void addGenerationCondition(ProcedureOption pOption)
          Adds the given ProcedureOption to the collection of options that controls whether this ProcedureLine will be generated.
 java.util.Collection<ProcedureOption> getGenerationConditions()
          Obtains an unmodifiable collection of ProcedureOptions that are defined as conditioning generation of this ProcedureLine.
 java.io.Serializable getInternalId()
          Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.
 OdiProcedureLine.LogCounter getLogCounter()
          Obtains the LogCounter defined for this ProcedureLine.
 int getLogLevel()
          Obtains the log level applied to this ProcedureLine.
 java.lang.String getName()
          Obtains the name of this ProcedureLine.
 OdiProcedureLineCmd getOnSourceCommand()
          Obtains the OdiProcedureLineCmd object that defines the command to be applied on a source connection.
 OdiProcedureLineCmd getOnTargetCommand()
          Obtains the OdiProcedureLineCmd object that defines the command to be applied on a source connection.
 int getOrder()
          Obtains the execution order of this OdiProcedureLine within the list of OdiProcedureLines that belong to an OdiProcedure.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 boolean isAlwaysGenerated()
          Return whether this ProcedureLine is always generated into execution tasks, without any condition, or not.
 boolean isIgnoreError()
          Is ignore error?
 void removeGenerationCondition(ProcedureOption pOption)
          Removes the given ProcedureOption to the collection options that controls whether this OdiProcedureLine will be generated, or not.
 void setAlwaysGenerated(boolean pAlwaysGenerated)
          Defines whether this ProcedureLine is always generated into execution tasks.
 void setIgnoreError(boolean ignoreError)
          Defines whether this ProcedureLine should ignore error when executed, or not.
If set to true, when an error occurs during exection, the line will go into Warning instead of Error, and the OdiProcedure will not be stopped.
 void setLogCounter(OdiProcedureLine.LogCounter logCounter)
          Defines the LogCounter type for this ProcedureLine.
 void setLogLevel(int logLevel)
          Defines the log level that will be applied to this ProcedureLine when executed.
 void setName(java.lang.String pName)
          Defines the name of this ProcedureLine.
 void setOnSourceCommand(OdiProcedureLineCmd command)
          Defines the command to be applied on a source connection.
 void setOnTargetCommand(OdiProcedureLineCmd command)
          Defines the command to be applied on a target connection.
 
Methods inherited from class oracle.odi.domain.support.BusinessObject
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_MAX_LENGTH

public static final int NAME_MAX_LENGTH
Maximum length of an OdiProcedureLine name.

See Also:
Constant Field Values
Method Detail

addGenerationCondition

public void addGenerationCondition(ProcedureOption pOption)
Adds the given ProcedureOption to the collection of options that controls whether this ProcedureLine will be generated. Does nothing if the given option is already defined as generation condition to this ProcedureLine.

Parameters:
pOption - ProcedureOption to add
Throws:
java.lang.IllegalArgumentException - if the given option is null, or does not belongs to the same OdiProcedure than this OdiProcedureLine.
See Also:
removeGenerationCondition(oracle.odi.domain.project.ProcedureOption)

getGenerationConditions

public java.util.Collection<ProcedureOption> getGenerationConditions()
Obtains an unmodifiable collection of ProcedureOptions that are defined as conditioning generation of this ProcedureLine.

Returns:
unmodifiable collection of ProcedureOptions.

getInternalId

public java.io.Serializable getInternalId()
Description copied from interface: IRepositoryEntity
Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.

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.

Returns:
the persistence identity of this instance

getLogCounter

public OdiProcedureLine.LogCounter getLogCounter()
Obtains the LogCounter defined for this ProcedureLine.

Returns:
a OdiProcedureLine.LogCounter representing the LogCounter type for this object.
See Also:
setLogCounter(oracle.odi.domain.project.OdiProcedureLine.LogCounter)

getLogLevel

public int getLogLevel()
Obtains the log level applied to this ProcedureLine.

Returns:
the log level applied to this ProcedureLine
See Also:
setLogLevel(int)

getName

public java.lang.String getName()
Obtains the name of this ProcedureLine.

Returns:
Name of OdiProcedureLine
See Also:
setName(java.lang.String)

getOnSourceCommand

public OdiProcedureLineCmd getOnSourceCommand()
Obtains the OdiProcedureLineCmd object that defines the command to be applied on a source connection.

Note: the returned OdiProcedureLineCmd is a copy of the actual OdiProcedureLineCmd instance. setOnSourceCommand must be called before any of the changes are applied.

This method will never return null.

Returns:
OdiProcedureLineCmd object that defines the command to be applied
See Also:
setOnSourceCommand(oracle.odi.domain.project.OdiProcedureLineCmd)

getOnTargetCommand

public OdiProcedureLineCmd getOnTargetCommand()
Obtains the OdiProcedureLineCmd object that defines the command to be applied on a source connection.

Note: the returned OdiProcedureLineCmd is a copy of the actual OdiProcedureLineCmd instance. setOnTargetCommand should be called before any of the changes are applied.

This method will never return null.

Returns:
the OdiProcedureLineCmd object that defines the command to be applied
See Also:
setOnTargetCommand(oracle.odi.domain.project.OdiProcedureLineCmd)

getOrder

public int getOrder()
Obtains the execution order of this OdiProcedureLine within the list of OdiProcedureLines that belong to an OdiProcedure.

Returns:
execution order
See Also:
OdiProcedure.moveLineAfter(OdiProcedureLine, OdiProcedureLine), OdiProcedure.moveLineBefore(OdiProcedureLine, OdiProcedureLine)

getSecurityContainer

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

Returns:
container entity

isAlwaysGenerated

public boolean isAlwaysGenerated()
Return whether this ProcedureLine is always generated into execution tasks, without any condition, or not.

Returns:
true if this ProcedureLine is always generated into execution tasks
See Also:
setAlwaysGenerated(boolean)

isIgnoreError

public boolean isIgnoreError()
Is ignore error?

Returns:
true if this line will ignore any errors during execution
See Also:
setIgnoreError(boolean)

removeGenerationCondition

public void removeGenerationCondition(ProcedureOption pOption)
Removes the given ProcedureOption to the collection options that controls whether this OdiProcedureLine will be generated, or not. Does nothing if the given option isn't defined as generation condition to this OdiProcedureLine.

Parameters:
pOption - ProcedureOption to remove
Throws:
java.lang.IllegalArgumentException - if the given option is null, or does not belongs to the same OdiProcedure than this OdiProcedureLine.
See Also:
addGenerationCondition(oracle.odi.domain.project.ProcedureOption)

setAlwaysGenerated

public void setAlwaysGenerated(boolean pAlwaysGenerated)
Defines whether this ProcedureLine is always generated into execution tasks. By default, a ProcedureLine is always generated.

Parameters:
pAlwaysGenerated - true if this ProcedureLine should always be generated into execution tasks
See Also:
isAlwaysGenerated()

setIgnoreError

public void setIgnoreError(boolean ignoreError)
Defines whether this ProcedureLine should ignore error when executed, or not.
If set to true, when an error occurs during exection, the line will go into Warning instead of Error, and the OdiProcedure will not be stopped. By default, a ProcedureLine ignores errors.

Parameters:
ignoreError - true to have this line ignore any errors during execution
See Also:
isIgnoreError()

setLogCounter

public void setLogCounter(OdiProcedureLine.LogCounter logCounter)
Defines the LogCounter type for this ProcedureLine. By default, logCounter is set to LogCounter.UNDEFINED.

Parameters:
logCounter - LogCounter type for this ProcedureLine
Throws:
java.lang.IllegalArgumentException - if given logCounter is null.
See Also:
getLogCounter()

setLogLevel

public void setLogLevel(int logLevel)
Defines the log level that will be applied to this ProcedureLine when executed. By default, log level is set to 5.

Parameters:
logLevel - int value representing the log level for this object
See Also:
getLogLevel()

setName

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

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

setOnSourceCommand

public void setOnSourceCommand(OdiProcedureLineCmd command)
Defines the command to be applied on a source connection. Can be null. If the command is null, the source information will be set to defaults.

Parameters:
command - OdiProcedureLineCmd object to apply
See Also:
getOnSourceCommand()

setOnTargetCommand

public void setOnTargetCommand(OdiProcedureLineCmd command)
Defines the command to be applied on a target connection. Can be null. If the command is null, the source information will be set to defaults.

Parameters:
command - OdiProcedureLineCmd object to apply
See Also:
getOnTargetCommand()

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.