Skip navigation links

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

E17060-03


oracle.odi.domain.project
Class OdiVariable

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.project.OdiVariable

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IExportable, IOdiEntity, IRepositoryEntity, IWorkDevelopmentOdiEntity, IOdiScenarioSource, ISmartExportable

public class OdiVariable
extends oracle.odi.domain.support.AbstractOdiEntity
implements IOdiScenarioSource, IWorkDevelopmentOdiEntity, IExportable, ISmartExportable

Represents design time metadata about a variable.

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.

Scope of an OdiVariable cannot be changed.

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).

Since:
11.1.1.3.0
See Also:
Serialized Form

Nested Class Summary
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.

 

Field Summary
static int NAME_MAX_LENGTH
          OdiVariable's name maximum length.

 

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

 

Constructor Summary
OdiVariable(OdiProject pProject, java.lang.String pName)
          Construct a new OdiVariable with the given name owned by the given OdiProject.
OdiVariable(java.lang.String pName)
          Construct a new global (i.e.

 

Method Summary
 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.
 Expression getRefreshQuery()
          Returns the SQL expression used to refresh this OdiVariable instance value.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 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.

 

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

 

Field Detail

NAME_MAX_LENGTH

public static final int NAME_MAX_LENGTH
OdiVariable's name maximum length.
See Also:
Constant Field Values

Constructor Detail

OdiVariable

public OdiVariable(java.lang.String pName)
Construct a new global (i.e. without any enclosing project) OdiVariable with the given name.
Parameters:
pName - the name of the variable
Throws:
DomainRuntimeException - if the name is null, empty or longer than 400
See Also:
NAME_MAX_LENGTH

OdiVariable

public OdiVariable(OdiProject pProject,
                   java.lang.String pName)
Construct a new OdiVariable with the given name owned by the given OdiProject.
Parameters:
pProject - the owning project
pName - the name of the variable
Throws:
DomainRuntimeException - if the name is null, empty or longer than NAME_MAX_LENGTH
See Also:
NAME_MAX_LENGTH

Method Detail

setDefaultValue

public void setDefaultValue(java.lang.Object pValue)
Defines the default value of this OdiVariable instance. The specified value's type must be in accordance with the OdiVariable.DataType enum value.
Parameters:
pValue - the value to set.
Throws:
DomainRuntimeException - if the given value is not consistent with this variable's data type
See Also:
getDataType(), getDefaultValue()

isGlobal

public boolean isGlobal()
Returns whether this OdiVariable is global, or not (i.e. whether there is a owning OdiProject or not).
Returns:
true if this variable is global, false otherwise

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

setRefreshQuery

public void setRefreshQuery(Expression pSqlExpression)
Sets the SQL expression used to refresh this OdiVariable instance value against an OdiLogicalSchema defined using the setLogicalSchema(OdiLogicalSchema) method.
Parameters:
pSqlExpression - the refresh query
See Also:
setLogicalSchema(OdiLogicalSchema), getLogicalSchema(), getRefreshQuery()

getRefreshQuery

public Expression getRefreshQuery()
Returns the SQL expression used to refresh this OdiVariable instance value.
Returns:
this variable's refresh query, or null
See Also:
getLogicalSchema(), setLogicalSchema(OdiLogicalSchema), setRefreshQuery(Expression)

setLogicalSchema

public void setLogicalSchema(OdiLogicalSchema pOdiLogicalSchema)
Defines the logical schema used to refresh this variable's value.
Parameters:
pOdiLogicalSchema - the logical schema
See Also:
setRefreshQuery(Expression), getRefreshQuery(), getLogicalSchema()

getDefaultValue

public java.lang.Object getDefaultValue()
Returns the current value of this OdiVariable instance.

The actual class of returned object depends on this variable's value type.

Returns:
this variable's default value
See Also:
setDefaultValue(Object), getDataType()

getQualifiedName

public java.lang.String getQualifiedName()
Returns the qualified name of this OdiVariable instance.
Returns:
qualified name for this variable
Since:
11.1.1.5.0

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

getProject

public OdiProject getProject()
Returns the OdiProject that owns this OdiVariable instance.
Returns:
the project this variable belongs to, or null if none.
See Also:
isGlobal()

setName

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.

Parameters:
pName - the name of the variable
Throws:
DomainRuntimeException - if the name is null or empty, or longer than NAME_MAX_LENGTH

setDescription

public void setDescription(java.lang.String pDescription)
Defines a description for this OdiVariable instance.
Parameters:
pDescription - the description
See Also:
getDescription()

getName

public java.lang.String getName()
Returns the name of this OdiVariable instance.
Specified by:
getName in interface IOdiEntity
Overrides:
getName in class oracle.odi.domain.support.AbstractOdiEntity
Returns:
this variable's name
See Also:
setName(String)

getDescription

public java.lang.String getDescription()
Returns the description of this OdiVariable instance.
Returns:
this variable's description
See Also:
setDescription(String)

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

getAction

@Deprecated
public OdiVariable.Action getAction()
Deprecated. As of ODI 11.1.1.5 replaced by getValuePersistence()
Returns the values storage strategy for this OdiVariable instance. It can't be null.
Returns:
an OdiVariable.Action instance
See Also:
setAction(Action)

setAction

@Deprecated
public void setAction(OdiVariable.Action pAction)
Deprecated. As of ODI 11.1.1.5 replaced by setValuePersistence(ValuePersistence)
Defines the value storage strategy for this OdiVariable instance. By default, the action is defined with the enum value OdiVariable.Action.HISTORIZE.
Parameters:
pAction - the action of this variable
See Also:
getAction()

getValuePersistence

public OdiVariable.ValuePersistence getValuePersistence()
Returns the values persistence strategy for this OdiVariable.
Returns:
a ValuePersistence
See Also:
setValuePersistence(ValuePersistence)

setValuePersistence

public void setValuePersistence(OdiVariable.ValuePersistence pValuePersistence)
Defines the value persistence strategy for this OdiVariable.

By default, it is defined with the enum value OdiVariable.ValuePersistence.HISTORIZE.

Parameters:
pAction - the action of this variable
See Also:
getValuePersistence()

getVariableId

public java.lang.Number getVariableId()
Returns this OdiVariable instance identifier.
Returns:
this variable's ID

getLogicalSchema

public OdiLogicalSchema getLogicalSchema()
Returns the OdiLogicalSchema used for the refresh of this OdiVariable instance values.
Returns:
this variable's logical schema, or null if none.
See Also:
setLogicalSchema(OdiLogicalSchema)

getDataType

public OdiVariable.DataType getDataType()
Returns the OdiVariable.DataType defined on this OdiVariable instance.
Returns:
this variable's data type
See Also:
setDataType(DataType)

setDataType

public void setDataType(OdiVariable.DataType pDatatype)
Defines the data type of this OdiVariable instance. Default value is OdiVariable.DataType.SHORT_TEXT.
Parameters:
pDatatype - the data type
Throws:
DomainRuntimeException - if the parameter is null;
See Also:
getDataType()

Skip navigation links

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

E17060-03


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