public class OdiVariable extends oracle.odi.domain.support.AbstractOdiEntity implements IOdiScenarioSource, IWorkDevelopmentOdiEntity, oracle.odi.domain.impexp.IExportable, oracle.odi.impexp.smartie.ISmartExportable, IVariable, oracle.odi.core.audit.support.IAuditableFirstClassObject
OdiVariable class is the only member of OdiVariable aggregate, thus it is the
 root entity and implements IOdiEntity interface. An OdiVariable has an ID
 that can be obtained from getVariableId() method call. This ID is assigned
 when an OdiVariable is stored in design time repository. This ID represents
 the identity of an OdiVariable. Equals / hashCode method are implemented
 according this identity.
There is two distinct scopes of OdiVariable: Global and Project.
Life cycle of an OdiVariable begins at design time when it is created from one of its constructors, or when imported from external XML file. 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 remove the OdiVariable instance from design time repository, or if enclosing OdiProject is removed (Project Scope).
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
OdiVariable.Action
Deprecated. 
 
As of ODI 11.1.1.5 replaced by  
OdiVariable.ValuePersistence. | 
static class  | 
OdiVariable.DataType
Defines the data type of an OdiVariable. 
 | 
static class  | 
OdiVariable.ValuePersistence
Enumeration representing the different persistence mode of a variable value. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static int | 
NAME_MAX_LENGTH
OdiVariable's name maximum length. 
 | 
| Constructor and Description | 
|---|
OdiVariable(OdiProject pProject,
           java.lang.String pName)
 | 
OdiVariable(java.lang.String pName)
Construct a new global (i.e. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
OdiVariable.Action | 
getAction()
Deprecated. 
 
As of ODI 11.1.1.5 replaced by  
getValuePersistence() | 
OdiVariable.DataType | 
getDataType()
Returns the  
OdiVariable.DataType defined on this OdiVariable instance. | 
java.lang.Object | 
getDefaultValue()
Returns the current value of this  
OdiVariable instance. | 
java.lang.String | 
getDescription()
Returns the description of this  
OdiVariable instance. | 
java.io.Serializable | 
getInternalId()
Provides a common getter for the persistence layer to obtain an identity,
 irrespective of the actual type of identity used. 
 | 
OdiLogicalSchema | 
getLogicalSchema()
Returns the  
OdiLogicalSchema used for the refresh of this OdiVariable instance values. | 
java.lang.String | 
getName()
Returns the name of this  
OdiVariable instance. | 
OdiProject | 
getProject()
Returns the  
OdiProject that owns this OdiVariable instance. | 
java.lang.String | 
getQualifiedName()
Returns the qualified name of this  
OdiVariable instance. | 
java.lang.String | 
getReferenceSubstitutionValue()
Return the code generator substitution value for the variable when 
 it is referenced in an expression. 
 | 
Expression | 
getRefreshQuery()
Returns the SQL expression used to refresh this  
OdiVariable instance value. | 
OdiVariable.ValuePersistence | 
getValuePersistence()
Returns the values persistence strategy for this  
OdiVariable. | 
java.lang.Number | 
getVariableId()
Returns this  
OdiVariable instance identifier. | 
boolean | 
isGlobal()
Returns whether this OdiVariable is global, or not 
 (i.e. 
 | 
boolean | 
isInstanceLevelSecurityNeeded()
Internal: this method is for internal purpose and must not be considered
 as part of the public API. 
 | 
void | 
setAction(OdiVariable.Action pAction)
Deprecated. 
 
As of ODI 11.1.1.5 replaced by  
setValuePersistence(ValuePersistence) | 
void | 
setDataType(OdiVariable.DataType pDatatype)
Defines the data type of this  
OdiVariable instance. | 
void | 
setDefaultValue(java.lang.Object pValue)
Defines the default value of this  
OdiVariable instance. | 
void | 
setDescription(java.lang.String pDescription)
Defines a description for this  
OdiVariable instance. | 
void | 
setLogicalSchema(OdiLogicalSchema pOdiLogicalSchema)
Defines the logical schema used to refresh this variable's value. 
 | 
void | 
setName(java.lang.String pName)
Sets the name of this OdiVariable.* pName must 400 characters long max., 
 Can't be null or empty. 
 | 
void | 
setRefreshQuery(Expression pSqlExpression)
Sets the SQL expression used to refresh this  
OdiVariable instance value against 
 an OdiLogicalSchema defined using the setLogicalSchema(OdiLogicalSchema)
 method. | 
void | 
setValuePersistence(OdiVariable.ValuePersistence pValuePersistence)
Defines the value persistence strategy for this  
OdiVariable. | 
getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, isNew, preCommit, toStringequals, getBigNumericId, getGlobalId, getNumericId, getParent, hashCodegetFirstDate, getFirstUser, getLastDate, getLastUsergetGlobalId, getParentgetBigNumericId, getGlobalId, getNumericIdpublic static final int NAME_MAX_LENGTH
public OdiVariable(java.lang.String pName)
OdiVariable with 
 the given name.pName - the name of the variableDomainRuntimeException - if the name is null, empty or longer than 400NAME_MAX_LENGTHpublic OdiVariable(OdiProject pProject, java.lang.String pName)
pProject - the owning projectpName - the name of the variableDomainRuntimeException - if the name is null, empty or longer than NAME_MAX_LENGTHNAME_MAX_LENGTHpublic void setDefaultValue(java.lang.Object pValue)
OdiVariable instance.      The specified value's type must 
 be in accordance with the OdiVariable.DataType enum value.pValue - the value to set.DomainRuntimeException - if the given value is not consistent with this variable's data typegetDataType(), 
getDefaultValue()public boolean isGlobal()
true if this variable is global, false otherwisepublic 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 void setRefreshQuery(Expression pSqlExpression)
OdiVariable instance value against 
 an OdiLogicalSchema defined using the setLogicalSchema(OdiLogicalSchema)
 method.pSqlExpression - the refresh querysetLogicalSchema(OdiLogicalSchema), 
getLogicalSchema(), 
getRefreshQuery()public Expression getRefreshQuery()
OdiVariable instance value.nullgetLogicalSchema(), 
setLogicalSchema(OdiLogicalSchema), 
setRefreshQuery(Expression)public void setLogicalSchema(OdiLogicalSchema pOdiLogicalSchema)
pOdiLogicalSchema - the logical schemasetRefreshQuery(Expression), 
getRefreshQuery(), 
getLogicalSchema()public java.lang.Object getDefaultValue()
OdiVariable instance. 
 The actual class of returned object depends on this variable's value type.
setDefaultValue(Object), 
getDataType()public java.lang.String getQualifiedName()
OdiVariable instance.getQualifiedName in interface IModelObjectpublic OdiProject getProject()
OdiProject that owns this OdiVariable instance.getProject in interface IVariablenull if none.isGlobal()public void setName(java.lang.String pName)
Sets the name of this OdiVariable.* pName must 400 characters long max., Can't be null or empty.
pName - the name of the variableDomainRuntimeException - if the name is null or empty, or longer than NAME_MAX_LENGTHpublic void setDescription(java.lang.String pDescription)
OdiVariable instance.pDescription - the descriptiongetDescription()public java.lang.String getName()
OdiVariable instance.getName in interface IModelObjectgetName in interface IOdiEntitygetName in class oracle.odi.domain.support.AbstractOdiEntitysetName(String)public java.lang.String getDescription()
OdiVariable instance.setDescription(String)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.
 
getInternalId in interface IRepositoryEntity@Deprecated public OdiVariable.Action getAction()
getValuePersistence()OdiVariable instance.
 It can't be null.OdiVariable.Action instancesetAction(Action)@Deprecated public void setAction(OdiVariable.Action pAction)
setValuePersistence(ValuePersistence)OdiVariable instance.
 By default, the action is defined with the enum value OdiVariable.Action.HISTORIZE.pAction - the action of this variablegetAction()public OdiVariable.ValuePersistence getValuePersistence()
OdiVariable.setValuePersistence(ValuePersistence)public void setValuePersistence(OdiVariable.ValuePersistence pValuePersistence)
OdiVariable.
 By default, it is defined with the enum value OdiVariable.ValuePersistence.HISTORIZE.
pAction - the action of this variablegetValuePersistence()public java.lang.Number getVariableId()
OdiVariable instance identifier.public OdiLogicalSchema getLogicalSchema()
OdiLogicalSchema used for the refresh of this OdiVariable instance values.null if none.setLogicalSchema(OdiLogicalSchema)public OdiVariable.DataType getDataType()
OdiVariable.DataType defined on this OdiVariable instance.setDataType(DataType)public void setDataType(OdiVariable.DataType pDatatype)
OdiVariable instance. Default value is OdiVariable.DataType.SHORT_TEXT.pDatatype - the data typeDomainRuntimeException - if the parameter is null;getDataType()public java.lang.String getReferenceSubstitutionValue()
IVariablegetReferenceSubstitutionValue in interface IVariable