Skip navigation links

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

E17060-02


oracle.odi.domain.runtime.session
Class OdiSession

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.runtime.session.OdiSession

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IOdiEntity, IRepositoryEntity, IWorkRuntimeOdiEntity

public final class OdiSession
extends oracle.odi.domain.support.AbstractOdiEntity
implements IWorkRuntimeOdiEntity

An OdiSession is an execution (of a scenario, an interface, a package or a procedure, ...) undertaken by an execution agent. OdiSession is the root entity in OdiSession - OdiSessionVariable - OdiSessionStepLog. It is identified by a unique session ID that can be obtained from getSessionId() method call.

Life cycle of an OdiSession begins when it is created / prepared from a scenario, an interface, etc. Once prepared, ODI Execution Engine can execute it. Life cycle ends when the session is removed from runtime repository.

Since:
11.1.1.3.0
See Also:
Serialized Form

Field Summary

 

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

 

Method Summary
 java.lang.String getAgentName()
          Returns the name of the agent that manage this OdiSession.
 int getChildSessionCount()
          Obtains the count of child OdiSession.
 java.lang.String getContextCode()
          Returns the execution context code for this OdiSession.
 java.lang.Integer getDeleteCount()
          Relevant for Interfaces and Procedures and any execution that manipulates data.
 java.lang.Integer getDuration()
          Returns the duration of the OdiSession execution in second, or null if not yet defined (i.e.
 java.util.Date getEndTime()
          Returns the end time of the OdiSession, or null if the session isn't yet finished.
 java.lang.Integer getErrorCount()
          Obtains number of errors of this session i.e.
 java.lang.String getErrorMessage()
          Obtains the error message of this OdiSession if failed, or null if the session successfully ended.
 java.lang.Long getEssJobId()
          Returns the ID of ESS Job which started this OdiSession.
 java.lang.Long getEssRequestExecutionContext()
          Returns the RequestExecutionContext of ESS Job which started this OdiSession.
 int getFailedChildSessionCount()
          Obtains the count of failed child OdiSession.
 OdiSessionStepLog getFailureStepLog()
          Return the step log (OdiSessionStepLog) that caused the session's failure.
 java.lang.Integer getInsertCount()
          Relevant for Interfaces and Procedures and any execution that manipulates data.
 java.io.Serializable getInternalId()
          Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.
 java.lang.String getKeywordsAsString()
          Obtains comma separated list of keywords associated with OdiSession.
 LogLevel getLogLevel()
          Returns logging level of this session.
 java.lang.String getMasterAgentName()
          Returns the name of agent received execution request for this session.
 java.lang.String getName()
          Returns the name of this OdiSession (i.e.
 java.lang.Number getParentSessionId()
          Obtains the ID of parent OdiSession.
 java.lang.Integer getRecordCount()
          Relevant for Interfaces and Procedures and any execution that manipulates data.
 java.lang.String getReturnCode()
          Obtains the return code of this OdiSession.
 OdiSessionStepLog getRunningStepLog()
          Obtains the current running step log (OdiSessionStepLog), or null if the execution is not yet started or is finished.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 java.lang.Number getSessionId()
          Returns the ID of this OdiSession.
 java.util.List<OdiSessionStepLog> getSessionStepLogs()
          Obtains the ordered list of executed steps' logs (OdiSessionStepLog).
 java.util.Collection<OdiSessionVariable> getSessionVariables()
          Obtains an unmodifiable collection of the variables that are used inside this OdiSession.
 Tag getSourceScenarioTag()
          Obtains actual scenario's tag being executed or null if not executed from scenario.
 java.util.Date getStartTime()
          Returns the start time of the OdiSession, or null if the session isn't started yet.
 Status getStatus()
          Obtains the current status of this OdiSession.
 java.lang.String getSubmitterName()
          Obtains actual ODI user name that has submitted the OdiSession.
 int getSuccessfulChildSessionCount()
          Obtains the count of successful child OdiSession.
 java.lang.Integer getUpdateCount()
          Relevant for Interfaces and Procedures and any execution that manipulates data.
 boolean isEssJobSession()
          Returns true if this OdiSession was started by ESS Job, false otherwise.
 boolean isInstanceLevelSecurityNeeded()
          Internal: this method is for internal purpose and must not be considered as part of the public API.
 void setStatus(Status pStatus)
          Set the current status of this session.

 

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

 

Method Detail

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.

Specified by:
getInternalId in interface IRepositoryEntity
Returns:
the persistence identity of this instance

getName

public java.lang.String getName()
Returns the name of this OdiSession (i.e. the name of the element that produce this session, this means the package, variable, scenario, etc.).
Specified by:
getName in interface IOdiEntity
Overrides:
getName in class oracle.odi.domain.support.AbstractOdiEntity
Returns:
the name of the OdiSession

getSessionId

public java.lang.Number getSessionId()
Returns the ID of this OdiSession.
Returns:
the ID of this OdiSession

getStatus

public Status getStatus()
Obtains the current status of this OdiSession.
Returns:
the current status of this OdiSession
See Also:
setStatus(Status)

getAgentName

public java.lang.String getAgentName()
Returns the name of the agent that manage this OdiSession.
Returns:
the agent's name

getContextCode

public java.lang.String getContextCode()
Returns the execution context code for this OdiSession.
Returns:
the execution context code

getSourceScenarioTag

public Tag getSourceScenarioTag()
Obtains actual scenario's tag being executed or null if not executed from scenario.
Returns:
actual scenario's tag being executed

getSubmitterName

public java.lang.String getSubmitterName()
Obtains actual ODI user name that has submitted the OdiSession.
Returns:
actual ODI user name that has submitted the OdiSession

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

getKeywordsAsString

public java.lang.String getKeywordsAsString()
Obtains comma separated list of keywords associated with OdiSession. Keywords are used to distribute this OdiSession into OdiSessionFolder.
Returns:
comma separated list of keywords associated with OdiSession

getStartTime

public java.util.Date getStartTime()
Returns the start time of the OdiSession, or null if the session isn't started yet.
Returns:
the start time of the OdiSession

getEndTime

public java.util.Date getEndTime()
Returns the end time of the OdiSession, or null if the session isn't yet finished.
Returns:
the end time of the OdiSession

getDuration

public java.lang.Integer getDuration()
Returns the duration of the OdiSession execution in second, or null if not yet defined (i.e. the execution is still running).
Returns:
the duration of the OdiSession execution in second

getReturnCode

public java.lang.String getReturnCode()
Obtains the return code of this OdiSession.

The return code is obtained from the execution channel of the last task, e.g. operating system code, database error code, etc. It will be "0" (zero) in case of success.

Returns:
the return code of this OdiSession

getErrorMessage

public java.lang.String getErrorMessage()
Obtains the error message of this OdiSession if failed, or null if the session successfully ended.
Returns:
the error message of this OdiSession if failed

getChildSessionCount

public int getChildSessionCount()
Obtains the count of child OdiSession.
Returns:
the count of child OdiSession

getSuccessfulChildSessionCount

public int getSuccessfulChildSessionCount()
Obtains the count of successful child OdiSession.
Returns:
the count of successful child OdiSession

getFailedChildSessionCount

public int getFailedChildSessionCount()
Obtains the count of failed child OdiSession.
Returns:
the count of failed child OdiSession

getSessionStepLogs

public java.util.List<OdiSessionStepLog> getSessionStepLogs()
Obtains the ordered list of executed steps' logs (OdiSessionStepLog). If a running step exists it will be the last one in the returned list.
Returns:
an unmodifiable list of step's logs (OdiSessionStepLog)

getFailureStepLog

public OdiSessionStepLog getFailureStepLog()
Return the step log (OdiSessionStepLog) that caused the session's failure. If the session didn't failed, than method will always return null. However, it can be null even if session is failed (e.g. session failed at preparation time).
Returns:
the step log (OdiSessionStepLog) that caused the session's failure, or null if the session didn't failed

getRunningStepLog

public OdiSessionStepLog getRunningStepLog()
Obtains the current running step log (OdiSessionStepLog), or null if the execution is not yet started or is finished.
Returns:
the current running step log (OdiSessionStepLog)

getParentSessionId

public java.lang.Number getParentSessionId()
Obtains the ID of parent OdiSession.
Returns:
the ID of parent OdiSession

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

getRecordCount

public java.lang.Integer getRecordCount()

Relevant for Interfaces and Procedures and any execution that manipulates data.

Obtains overall numbers of records processed by this session i.e. the sum of records processed by each steps of this OdiSession.

Returns:
number of records processed by this session, or null if not applicable
See Also:
OdiSessionStepLog.getRecordCount()

getInsertCount

public java.lang.Integer getInsertCount()

Relevant for Interfaces and Procedures and any execution that manipulates data.

Obtains overall numbers of rows inserted during execution of this session i.e. the sum of insert made by each steps of this OdiSession.

Returns:
the number of rows inserted during the execution of this session
See Also:
OdiSessionStepLog.getInsertCount()

getUpdateCount

public java.lang.Integer getUpdateCount()

Relevant for Interfaces and Procedures and any execution that manipulates data.

Obtains overall numbers of rows updated during execution of this session i.e. the sum of update made by each steps of this OdiSession.

Returns:
the number of rows updated during the execution of this session
See Also:
OdiSessionStepLog.getUpdateCount()

getDeleteCount

public java.lang.Integer getDeleteCount()

Relevant for Interfaces and Procedures and any execution that manipulates data.

Obtains overall numbers of rows deleted during execution of this session i.e. the sum of delete made by each steps of this OdiSession.

Returns:
the number of rows deleted during the execution of this session
See Also:
OdiSessionStepLog.getDeleteCount()

getErrorCount

public java.lang.Integer getErrorCount()

Obtains number of errors of this session i.e. the sum of errors of each steps of this OdiSession.

Returns:
the number of errors
See Also:
OdiSessionStepLog.getErrorCount()

getSessionVariables

public java.util.Collection<OdiSessionVariable> getSessionVariables()
Obtains an unmodifiable collection of the variables that are used inside this OdiSession.
Returns:
an unmodifiable collection of the variables that are used inside this OdiSession

isEssJobSession

public boolean isEssJobSession()
Returns true if this OdiSession was started by ESS Job, false otherwise.
Returns:
true if this OdiSession was started by ESS Job, false otherwise

getEssJobId

public java.lang.Long getEssJobId()
Returns the ID of ESS Job which started this OdiSession.
Returns:
the ID of ESS Job which started this OdiSession
Throws:
java.lang.IllegalStateException - if this OdiSession is not ESS Job related

getEssRequestExecutionContext

public java.lang.Long getEssRequestExecutionContext()
Returns the RequestExecutionContext of ESS Job which started this OdiSession.
Returns:
the RequestExecutionContext of ESS Job which started this OdiSession
Throws:
java.lang.IllegalStateException - if this OdiSession is not ESS Job related
Since:
11.1.1.5.0

getLogLevel

public LogLevel getLogLevel()
Returns logging level of this session.
Returns:
logging level

getMasterAgentName

public java.lang.String getMasterAgentName()
Returns the name of agent received execution request for this session. May be different from agentName if the agent involved in load balancing.
Returns:
master agent's name

setStatus

public void setStatus(Status pStatus)
Set the current status of this session.
Parameters:
pStatus - the status
Since:
11.1.1.5.0
See Also:
getStatus()

Skip navigation links

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

E17060-02


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