public final class OdiScenario extends oracle.odi.domain.support.AbstractOdiEntity implements IWorkRuntimeOdiEntity, oracle.odi.domain.impexp.IExportable, IFlexFieldUser, oracle.odi.impexp.smartie.ISmartExportable, IScenario, IExecutable, oracle.odi.core.audit.support.IAuditableFirstClassObject
An ODI Scenario is designed to put a source component (interface, package, procedure, variable) into production. It results from the generation of code (SQL, shell, etc) for this component.
OdiScenario is the root entity in OdiScenario -
OdiScenarioVariable - OdiScenarioSequence - OdiScenarioReport aggregate,
thus implements IOdiEntity interface. It is identified by a unique scenario ID that can be
obtained from getScenarioId() method call. Equals / hashCode method are implemented according this
identity. An OdiScenario can also be uniquely identified inside a given work repository
by its Tag which is made of the scenario name and version.
Life cycle of an OdiScenario begins during design time code generation. Once
generated, the scenario is stored inside the work repository (Design-time or Runtime work
repository). The scenario can be exported then imported to another repository (remote or not) and
executed inside ODI Execution Engine using different contexts (i.e. OdiContext). Also, a
scenario is operated from the work repository it is stored in. The same scenario can be executed in
several contexts from the same work repository. Life cycle ends when it is removed from runtime
repository.
Note: The scenario code (the language generated) is frozen, and all subsequent modifications of the components that contributed to creating it will not change it in any way.
OdiScenario also provides APIs to get source component that serves to generate
scenario. Note that in typical use case, scenario is exported from a design time repository and then
imported in a runtime repository, and then you will not be able to find that source component from
repository.
| Modifier and Type | Class and Description |
|---|---|
static class |
OdiScenario.PromptParamType
This Enum type indicates which variables will be prompted as scenario startup parameter.
|
| Modifier and Type | Method and Description |
|---|---|
IExecutableStep |
addStep(IExecutableStep step) |
IExecutableSequence |
createSequence(java.lang.String seqName,
int incValue,
java.lang.String colName,
java.lang.String logicalSchemaName,
int maxValue,
java.lang.String nativeName,
java.lang.String rowFilter,
java.lang.String tableName,
SequenceType seqType) |
IExecutableStep |
createStep(int stepNumber,
java.lang.String stepName,
StepType stepType) |
IExecutableVariable |
createVariable(java.lang.String varName,
VariableType varType,
java.lang.Object defaultVal,
java.lang.String desc,
boolean isReadOnly,
ValuePersistence valPersistence,
java.lang.Number order) |
CecBehavior |
getCecSessBehavior() |
java.lang.Number |
getCecSessPollIntv() |
java.lang.String |
getDescription()
Gets description of this
OdiScenario. |
java.util.Collection |
getFlexFieldsValues()
Obtains flex fields values related to this
IFlexFieldUser. |
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 |
getIsMaterialized()
Gets the IS_MATERIALIZED from SNP_SCEN
|
java.lang.Number |
getMaxCecSess() |
java.lang.String |
getName()
Gets the OdiScenario's tag name.
|
OdiScenario.PromptParamType |
getPromptParamType()
Returns the
OdiScenario.PromptParamType for this scenario. |
MapPhysicalDesign |
getScenarioDeploySpec(OdiInstance odiInstance)
A convenient method for finding physical design
|
java.lang.Number |
getScenarioDeploySpecId()
Get the physical design id from which this scenario is generated.
|
OdiScenarioFolder |
getScenarioFolder()
Returns the
OdiScenarioFolder containing this OdiScenario. |
java.lang.Number |
getScenarioId()
Gets the ID of this
OdiScenario. |
java.util.List |
getScenarioReports()
Obtains an unmodifiable list of this OdiScenario's execution reports.
|
java.util.Collection |
getScenarioSchedules()
Obtains an unmodifiable collection of the schedules created for this
OdiScenario. |
java.util.Collection |
getScenarioSequences()
Obtains an unmodifiable collection of the sequences that are used inside this
OdiScenario. |
java.util.List |
getScenarioSteps()
Obtains an unmodifiable list of the
OdiScenarioStep in this OdiScenario. |
java.util.Collection |
getScenarioVariables()
Obtains an unmodifiable collection of the variables that are used inside this
OdiScenario. |
int |
getSnapshotNumber()
Returns the snapshot number of this
OdiScenario. |
java.lang.Class |
getSourceComponentClass() |
java.io.Serializable |
getSourceComponentId()
Gets the ID of the source component (i.e.
|
java.lang.Number |
getSourceMappingId() |
java.util.List |
getSteps() |
Tag |
getTag()
Gets the OdiScenario's tag (name and version).
|
java.lang.String |
getVersion()
Gets the OdiScenario's tag version.
|
void |
initFlexFields(IOdiFlexFieldFinder pOdiFlexFieldFinder)
Initialize flex fields related to this
IFlexFieldUser. |
boolean |
isInstanceLevelSecurityNeeded()
Internal: this method is for internal purpose and must not be considered
as part of the public API.
|
void |
setCecSessBehavior(CecBehavior cecSessBehavior)
Set the
CecBehavior of this scenario that applies when getMaxCecSess() returns a positive value. |
void |
setCecSessPollIntv(java.lang.Number cecSessPollIntv)
Set the polling interval (in seconds) that applies when getMaxCecSess() returns a positive value and getCecSessBehavior() is WAIT.
|
void |
setMaxCecSess(java.lang.Number maxCecSess)
Set the maximum number of allowed concurrent session executions for this scenario.
|
void |
setPromptParamType(OdiScenario.PromptParamType promptParamType)
Sets the
OdiScenario.PromptParamType value for this scenario |
void |
setScenarioDeploySpecId(java.lang.Number pDeploySpecId)
Set senario physical design.
|
void |
setTag(Tag pTag)
Specifies the tag for this
OdiScenario. |
boolean |
wasGeneratedFromInterface()
Returns whether this
OdiScenario was generated from an Interface, or not. |
boolean |
wasGeneratedFromMapping() |
boolean |
wasGeneratedFromPackage()
Returns whether this
OdiScenario was generated from a Package, or not. |
boolean |
wasGeneratedFromUserProcedure()
Returns whether this
OdiScenario was generated from a User Procedure, or not. |
boolean |
wasGeneratedFromVariable()
Returns whether this
OdiScenario was generated from a Variable, or not. |
getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, isNew, preCommit, toStringequals, getBigNumericId, getGlobalId, getNumericId, getParent, hashCodegetBigNumericId, getGlobalId, getNumericIdgetFirstDate, getFirstUser, getLastDate, getLastUsergetGlobalId, getParentpublic OdiScenario(Tag pTag)
pTag - scenario Tagpublic Tag getTag()
public java.lang.String getName()
getName in interface IFlexFieldUsergetName in interface IModelObjectgetName in interface IOdiEntitygetName in class oracle.odi.domain.support.AbstractOdiEntitypublic java.lang.String getVersion()
getVersion in interface IScenariopublic java.lang.Number getScenarioId()
OdiScenario.OdiScenariopublic boolean isInstanceLevelSecurityNeeded()
IOdiEntityDefines a method to capture the info on which object needs instance level privilege.
isInstanceLevelSecurityNeeded in interface IOdiEntityisInstanceLevelSecurityNeeded in class oracle.odi.domain.support.AbstractOdiEntitytrue if instance level security needed,
false otherwisepublic java.lang.String getDescription()
OdiScenario.OdiScenariopublic java.io.Serializable getInternalId()
IRepositoryEntity
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.
getInternalId in interface IRepositoryEntitypublic java.util.Collection getScenarioVariables()
OdiScenario.OdiScenariopublic java.util.Collection getScenarioSequences()
OdiScenario.OdiScenariopublic java.util.Collection getScenarioSchedules()
OdiScenario.OdiScenariopublic java.util.List getScenarioReports()
public java.io.Serializable getSourceComponentId()
Interface, Package,
Variable or User Procedure) that was used to generate this
OdiScenario.public java.lang.Class getSourceComponentClass()
public boolean wasGeneratedFromInterface()
OdiScenario was generated from an Interface, or not.OdiScenario was generated from an Interface, or notpublic boolean wasGeneratedFromPackage()
OdiScenario was generated from a Package, or not.wasGeneratedFromPackage in interface IExecutableOdiScenario was generated from a Package, or notpublic boolean wasGeneratedFromVariable()
OdiScenario was generated from a Variable, or not.OdiScenario was generated from a Variable, or notpublic boolean wasGeneratedFromUserProcedure()
OdiScenario was generated from a User Procedure, or not.OdiScenario was generated from a User Procedure, or notpublic java.lang.Number getSourceMappingId()
public java.util.Collection getFlexFieldsValues()
IFlexFieldUserIFlexFieldUser.
In most implementations method IFlexFieldUser.initFlexFields(IOdiFlexFieldFinder) should be
called before calling this method.getFlexFieldsValues in interface IFlexFieldUserpublic void initFlexFields(IOdiFlexFieldFinder pOdiFlexFieldFinder)
IFlexFieldUserIFlexFieldUser.initFlexFields in interface IFlexFieldUserpOdiFlexFieldFinder - OdiFlexField finder to be used to query flex fieldspublic OdiScenarioFolder getScenarioFolder()
OdiScenarioFolder containing this OdiScenario.public void setScenarioDeploySpecId(java.lang.Number pDeploySpecId)
pDeploySpecId - The physical design Id from where this scenario is generated.public java.lang.Number getScenarioDeploySpecId()
public int getSnapshotNumber()
OdiScenario. This is value incremented on scenario
modification and regeneration.
This number is useful in identifying the scenario snapshot whether an existing session blueprint refers to the current scenario. If a session blueprint for a current scenario copy is available then that would be used for session execution otherwise a new session blueprint would be generated out of the current scenario snapshot.
getSnapshotNumber in interface IScenariosetSnapshotNumber(int)public void setTag(Tag pTag)
OdiScenario.pTag - public java.util.List getScenarioSteps()
OdiScenarioStep in this OdiScenario.public boolean wasGeneratedFromMapping()
public IExecutableStep createStep(int stepNumber, java.lang.String stepName, StepType stepType)
createStep in interface IExecutablepublic IExecutableStep addStep(IExecutableStep step)
addStep in interface IExecutablepublic IExecutableSequence createSequence(java.lang.String seqName, int incValue, java.lang.String colName, java.lang.String logicalSchemaName, int maxValue, java.lang.String nativeName, java.lang.String rowFilter, java.lang.String tableName, SequenceType seqType)
createSequence in interface IExecutablepublic IExecutableVariable createVariable(java.lang.String varName, VariableType varType, java.lang.Object defaultVal, java.lang.String desc, boolean isReadOnly, ValuePersistence valPersistence, java.lang.Number order)
createVariable in interface IExecutablepublic java.util.List getSteps()
getSteps in interface IExecutablepublic MapPhysicalDesign getScenarioDeploySpec(OdiInstance odiInstance)
public OdiScenario.PromptParamType getPromptParamType()
OdiScenario.PromptParamType for this scenario.
The default value is OdiScenarioPromptParamType.USE_ALLOdiScenario.PromptParamTypepublic void setPromptParamType(OdiScenario.PromptParamType promptParamType)
OdiScenario.PromptParamType value for this scenariopromptParamType - OdiScenario.PromptParamTypepublic java.lang.Number getMaxCecSess()
public void setMaxCecSess(java.lang.Number maxCecSess)
maxCecSess - public CecBehavior getCecSessBehavior()
CecBehavior of this scenario that applies when getMaxCecSess() returns a positive value.public void setCecSessBehavior(CecBehavior cecSessBehavior)
CecBehavior of this scenario that applies when getMaxCecSess() returns a positive value.public java.lang.Number getCecSessPollIntv()
public void setCecSessPollIntv(java.lang.Number cecSessPollIntv)
public java.lang.String getIsMaterialized()