public class OdiDataType extends oracle.odi.domain.support.AbstractOdiEntity implements IMasterOdiEntity, IDataType
OdiDataType
is a domain entity describing a single data type defined for an
ODI technology.
OdiDataType
s 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
OdiDataType
s related to this OdiTechnology
.
Instances of OdiDataType
related to a given OdiTechnology
are obtained
using the OdiTechnology.getDataTypes()
method.
OdiTechnology
,
Serialized FormIDataType.ConvertedDataType
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCode()
Returns the code of this data type.
|
OdiDataType |
getConvertedDataType(ITechnology 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. |
IDataType.ConvertedDataType |
getConvertedDataType(ITechnology pTargetTechnology,
java.lang.Integer pColLength,
java.lang.Integer pColScale)
|
java.lang.Number |
getDataTypeId()
The data type ID.
|
java.lang.String |
getDdlPattern()
Obtains DDL pattern for this
OdiDataType . |
java.lang.Integer |
getDefaultLength()
Get default length for this
OdiDataType . |
java.lang.Integer |
getDefaultScale()
Get default scale 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.Integer |
getMaxLength()
Get maximum length for this
OdiDataType . |
java.lang.Integer |
getMaxScale()
Get maximum scale for this
OdiDataType . |
java.lang.Integer |
getMinLength()
Get minimum length for this
OdiDataType . |
java.lang.Integer |
getMinScale()
Get minimum scale for this
OdiDataType . |
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. |
java.lang.String |
getTechnologyName()
Obtains the technology name that defines this
IDataType instance. |
boolean |
isLengthAllowed()
Based on DdlPattern property.
|
boolean |
isScaleAllowed()
Based on DdlPattern property.
|
java.lang.String |
toString() |
equals, getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, hashCode, isInstanceLevelSecurityNeeded, isNew
getGlobalId, getNumericId, hasCustomizedPersistenceMethodFor, invokeCustomizedPersistenceMethodFor
getFirstDate, getFirstUser, getLastDate, getLastUser, isInstanceLevelSecurityNeeded
getGlobalId
getGlobalId, getNumericId
public IDataType.ConvertedDataType getConvertedDataType(ITechnology pTargetTechnology, java.lang.Integer pColLength, java.lang.Integer pColScale)
IDataType
that corresponds to this instance of
IDataType
for the given target technology, or null
if no conversion is defined for the given technology. If a column length or scale
is specified, then conditional conversion will be done based on the length and scale.getConvertedDataType
in interface IDataType
pTargetTechnology
- the target technology for conversion of the datatype.pColLength
- the length of the source column to be converted.pColScale
- the scale of the source column to be converted.IDataType
object representing the data type for the specified technology.java.lang.IllegalArgumentException
- if the given technology is null
public OdiDataType getConvertedDataType(ITechnology pTargetTechnology)
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.getConvertedDataType
in interface IDataType
pTargetTechnology
- the target technology to convert from thisOdiDataType
representing this OdiDataType
for given technologyDomainRuntimeException
- if the given technology is null
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
public boolean isLengthAllowed()
true
if this data type allows length read-write access, false
otherwise.public boolean isScaleAllowed()
true
if this data type allows scale read-write access, false
otherwisepublic java.lang.String getCode()
That code is internally used by ODI to reference data types over repositories.
public java.lang.Number getDataTypeId()
OdiDataType
public IRepositoryEntity getSecurityContainer()
IRepositoryEntity
getSecurityContainer
in interface IRepositoryEntity
public OdiTechnology getTechnology()
OdiDataType
instance.getTechnology
in interface IDataType
OdiTechnology
objectpublic java.lang.String getName()
OdiDataType
.getName
in interface IModelObject
getName
in interface IDataType
getName
in interface IOdiEntity
getName
in class oracle.odi.domain.support.AbstractOdiEntity
public java.lang.String getDdlPattern()
OdiDataType
.getDdlPattern
in interface IDataType
public java.lang.String getIconLetter()
OdiDataType
.getIconLetter
in interface IDataType
public java.lang.Integer getDefaultLength()
OdiDataType
.public java.lang.Integer getMinLength()
OdiDataType
.public java.lang.Integer getMaxLength()
OdiDataType
.public java.lang.Integer getDefaultScale()
OdiDataType
.public java.lang.Integer getMinScale()
OdiDataType
.public java.lang.Integer getMaxScale()
OdiDataType
.public java.lang.String toString()
toString
in class oracle.odi.domain.support.AbstractOdiEntity
public java.lang.String getTechnologyName()
IDataType
IDataType
instance.getTechnologyName
in interface IDataType