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

E17060-01

oracle.odi.domain.topology
Class OdiDataType

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.topology.OdiDataType
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IMasterOdiEntity, IOdiEntity, IRepositoryEntity

public class OdiDataType
extends oracle.odi.domain.support.AbstractOdiEntity
implements IMasterOdiEntity

An OdiDataType is a domain entity describing a single data type defined for an ODI technology.

OdiDataTypes are mainly used inside ODI Knowledge Modules to create DDL statements according to the native technology. However they are also used at design-time when designing (or reversing) data models. Also, OdiDataType implements data type conversion from its own technology to one another.

OdiDataType is root of its own aggregate, but also part of aggregate with root OdiTechnology, this means deleting an OdiTechnology will also delete all OdiDataTypes related to this OdiTechnology.

Instances of OdiDataType related to a given OdiTechnology are obtained using the OdiTechnology.getDataTypes() method.

Since:
11.1.1.3.0
See Also:
OdiTechnology, Serialized Form

Field Summary
 
Fields inherited from class oracle.odi.domain.support.AbstractOdiEntity
STARTING_INTERNAL_VERSION
 
Method Summary
 java.lang.String getCode()
          Returns the code of this data type.
 OdiDataType getConvertedDataType(OdiTechnology pTargetTechnology)
          Convenient method to obtains the OdiDataType that corresponds to this instance of OdiDataType for the given target technology, or null if no conversion is defined for the given technology.
 java.lang.Number getDataTypeId()
          The data type ID.
 java.lang.String getDdlPattern()
          Obtains DDL pattern for this OdiDataType.
 java.lang.String getIconLetter()
          Obtains icon letter representing this OdiDataType.
 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 getName()
          Obtains the display name of this OdiDataType.
 IRepositoryEntity getSecurityContainer()
          Define a generic way to retrieve container for entities.
 OdiTechnology getTechnology()
          Obtains the technology that defines this OdiDataType instance.
 boolean isLengthAllowed()
          Based on DdlPattern property.
 boolean isScaleAllowed()
          Based on DdlPattern property.
 
Methods inherited from class oracle.odi.domain.support.AbstractOdiEntity
equals, getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, hashCode, isInstanceLevelSecurityNeeded, 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, isInstanceLevelSecurityNeeded
 

Method Detail

getCode

public java.lang.String getCode()
Returns the code of this data type.

That code is internally used by ODI to reference data types over repositories.

Returns:
the data type code

getConvertedDataType

public OdiDataType getConvertedDataType(OdiTechnology pTargetTechnology)
Convenient method to obtains the OdiDataType that corresponds to this instance of OdiDataType for the given target technology, or null if no conversion is defined for the given technology. If the target technology is equals to this data type's technology, this OdiDataType instance is returned.

Parameters:
pTargetTechnology - the target technology to convert from this
Returns:
an OdiDataType representing this OdiDataType for given technology
Throws:
java.lang.IllegalArgumentException - if the given technology is null

getDataTypeId

public java.lang.Number getDataTypeId()
The data type ID.

Returns:
internal id of this OdiDataType

getDdlPattern

public java.lang.String getDdlPattern()
Obtains DDL pattern for this OdiDataType.

Returns:
DDL pattern

getIconLetter

public java.lang.String getIconLetter()
Obtains icon letter representing this OdiDataType.

Returns:
icon letter

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()
Obtains the display name of this OdiDataType.

Specified by:
getName in interface IOdiEntity
Overrides:
getName in class oracle.odi.domain.support.AbstractOdiEntity
Returns:
data type name

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

getTechnology

public OdiTechnology getTechnology()
Obtains the technology that defines this OdiDataType instance.

Returns:
an OdiTechnology object

isLengthAllowed

public boolean isLengthAllowed()
Based on DdlPattern property. Length is considered allowed if DdlPattern contains "%L".

Returns:
true if this data type allow length read-write access, false otherwise

isScaleAllowed

public boolean isScaleAllowed()
Based on DdlPattern property. Scale is considered allowed if DdlPattern contains "%P".

Returns:
true if this data type allow scale read-write, false otherwise

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

E17060-01

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