public class OdiSessionCustomVariable extends AbstractRuntimeVariable
OdiSessionCustomVariable
represents the variable which is related to only one specific OdiSession
. This can be a variable overriding the default value of original OdiSessionBlueprintVariable
. In this case OdiSessionCustomVariable
holds reference to OdiSessionBlueprintVariable
, which properties are overridden. The only Variable's property available for modification is Default Value. It may be useful to modify this property for debugging/fixing the execution.
To override Default Value of OdiSessionBlueprintVariable
, new instance of OdiSessionCustomVariable
should be created in runtime repository. Runtime Agent will take its Default Value, instead of using initial value from blueprint then.
OdiSessionCustomVariable
can be created by user after OdiSession
executed once at least. It is possible to modify this object during its life-cycle. It remains in repository until the related OdiSession
is removed.
User then can obtain all OdiSessionCustomVariable
s of OdiSession
using OdiSession.getSessionCustomVariables()
method.
Constructor and Description |
---|
OdiSessionCustomVariable(OdiSessionBlueprintVariable pSessionBlueprintVariable)
Constructs new
OdiSessionCustomVariable overriding the specified OdiSessionBlueprintVariable . |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getDefaultValue()
Returns the default value of variable.
|
java.lang.String |
getDescription()
Returns the description of underlying
OdiSessionBlueprintVariable . |
java.io.Serializable |
getInternalId()
Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.
|
IRepositoryEntity |
getSecurityContainer()
Define a generic way to retrieve container for entities.
|
OdiSessionBlueprintVariable |
getSessionBlueprintVariable()
Returns the
OdiSessionBlueprintVariable , which default value is overridden in this OdiSessionCustomVariable . |
java.lang.Number |
getSessionId()
Returns the ID of
OdiSession . |
VariableType |
getType()
Returns the type of underlying
OdiSessionBlueprintVariable . |
ValuePersistence |
getValuePersistence()
Returns the value persistence type of underlying
OdiSessionBlueprintVariable . |
java.lang.Number |
getVariableOrder()
Returns the variable order of underlying
OdiSessionBlueprintVariable . |
boolean |
isReadOnly()
Returns true if the underlying
OdiSessionBlueprintVariable is not a startup parameter, false - otherwise. |
void |
setDefaultValue(java.lang.Object pValue)
Specifies the default value for variable.
|
getName
public OdiSessionCustomVariable(OdiSessionBlueprintVariable pSessionBlueprintVariable)
OdiSessionCustomVariable
overriding the specified OdiSessionBlueprintVariable
. This will inform the Runtime Agent that variable's default value was overridden between OdiSession
restarts.
The constructed overriding variable should be added to OdiSession
.
pSessionBlueprintVariable
- an OdiSessionBlueprintVariable
OdiSession.addSessionCustomVariable(OdiSessionCustomVariable)
public 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.
public IRepositoryEntity getSecurityContainer()
IRepositoryEntity
public java.lang.Number getSessionId()
OdiSession
.public OdiSessionBlueprintVariable getSessionBlueprintVariable()
OdiSessionBlueprintVariable
, which default value is overridden in this OdiSessionCustomVariable
.OdiSessionBlueprintVariable
public java.lang.Object getDefaultValue()
getDefaultValue
in class AbstractRuntimeVariable
AbstractRuntimeVariable.getDefaultValue()
, setDefaultValue(Object)
public void setDefaultValue(java.lang.Object pValue)
pValue
- default valuegetDefaultValue()
public VariableType getType()
OdiSessionBlueprintVariable
.getType
in class AbstractRuntimeVariable
public boolean isReadOnly()
OdiSessionBlueprintVariable
is not a startup parameter, false - otherwise.isReadOnly
in class AbstractRuntimeVariable
public ValuePersistence getValuePersistence()
OdiSessionBlueprintVariable
.getValuePersistence
in class AbstractRuntimeVariable
public java.lang.String getDescription()
OdiSessionBlueprintVariable
.getDescription
in class AbstractRuntimeVariable
public java.lang.Number getVariableOrder()
OdiSessionBlueprintVariable
.getVariableOrder
in class AbstractRuntimeVariable