com.metamatrix.metadata.runtime.api
Interface DataType

All Superinterfaces:
MetadataObject, java.io.Serializable

public interface DataType
extends MetadataObject

The DataType api represents the type of data a particular Element or Procedure is. The MetaMatrix standard types are called Runtime Types. Simple Types are called User Defined Types. Additionally, a complex data type can be defined to support a structure. This data type, called ResultSet, which can be defined by specifying the elements and their order.


Method Summary
 java.lang.String getDescription()
          Return the description.
 java.util.List getElements()
          Returns a list of type DataTypeElement.
 boolean getFixedPrecisionLength()
          Returns a boolean indicating whether precision length is fixed.
 java.lang.String getForm()
           
 java.lang.String getJavaClassName()
           
 int getLength()
          If the data type is numeric, the length is the total number of significant digits used to express the number.
 java.lang.String getMaximumRange()
          eturns the maximum value that the element can represent.
 java.lang.String getMinimumRange()
          Returns the minimum value that the element can represent.
 java.lang.String getNativeType()
           
 short getNullType()
          Returns a short indicating if the element can be set to null.
 java.lang.String getPath()
          Returns a string indicating the path.
 int getPrecisionLength()
          Returns an int indicating the precision length.
 DataType getPreferredDataType()
          if the data type is not a standard type, then this should return the MetaMatrix standard data type that is considered the preferred internal type to which this data type corresponds.
 int getRadix()
          Returns an int indicating the radix.
 DataType getRuntimeType()
          Returns Runtime type that this datatype is mapped to.
 int getScale()
          Returns the scale, which is the number of significant digits to the right of the decimal point.
 short getSearchType()
          Returns a short indicating the serach typr.
 short getType()
          Return short indicating the type.
 boolean isAutoIncrement()
          Returns a boolean indicating if the element is auto incremented by the database.
 boolean isCaseSensitive()
          Returns a boolean indicating if the element data is case sensitive.
 boolean isLengthFixed()
          Returns a boolean indicating if the length is fixed.
 boolean isPhysical()
          Returns a boolean indicating if this a physical data type.
 boolean isRuntimeType()
          Returns true if this datatype is Runtime Type, false otherwise.
 boolean isSigned()
          Returns a boolean indicating if the element data is signed.
 boolean isStandard()
          Returns a boolean indicating if this is a MetaMatrix standard type.
 boolean supportsSelect()
          Returns a boolean indicating if the element can be selected
 
Methods inherited from interface com.metamatrix.metadata.runtime.api.MetadataObject
clone, compareTo, equals, getFullName, getID, getName, getProperties, getVirtualDatabaseID, toString
 

Method Detail

getDescription

java.lang.String getDescription()
Return the description.

Returns:
String

isStandard

boolean isStandard()
Returns a boolean indicating if this is a MetaMatrix standard type.

Returns:
boolean true if it is a standard type

getPreferredDataType

DataType getPreferredDataType()
if the data type is not a standard type, then this should return the MetaMatrix standard data type that is considered the preferred internal type to which this data type corresponds.


getForm

java.lang.String getForm()

getScale

int getScale()
Returns the scale, which is the number of significant digits to the right of the decimal point. The scale cannot exceed the length, and the scale defaults to 0 (meaning it is an integer number and the decimal point is dropped).

Returns:
int

getLength

int getLength()
If the data type is numeric, the length is the total number of significant digits used to express the number. If it is a string, character array, or bit array it represents the maximum length of the value. For time and timestamp data types, the length is the number of positions that make up the fractional seconds.

Returns:
int

isLengthFixed

boolean isLengthFixed()
Returns a boolean indicating if the length is fixed.

Returns:
boolean

getNullType

short getNullType()
Returns a short indicating if the element can be set to null.

Returns:
short
See Also:
MetadataConstants.NULL_TYPES

supportsSelect

boolean supportsSelect()
Returns a boolean indicating if the element can be selected

Returns:
boolean

isCaseSensitive

boolean isCaseSensitive()
Returns a boolean indicating if the element data is case sensitive. This value shall be false if the data type is not a character, character array or string type.

Returns:
boolean

isSigned

boolean isSigned()
Returns a boolean indicating if the element data is signed.

Returns:
boolean

isAutoIncrement

boolean isAutoIncrement()
Returns a boolean indicating if the element is auto incremented by the database. Therefore, this element value should not be provided on an insert statement.

Returns:
boolean

getMinimumRange

java.lang.String getMinimumRange()
Returns the minimum value that the element can represent.

Returns:
String

getMaximumRange

java.lang.String getMaximumRange()
eturns the maximum value that the element can represent.

Returns:
String

getType

short getType()
Return short indicating the type.

Returns:
short
See Also:
MetadataConstants.DATATYPE_TYPES

getJavaClassName

java.lang.String getJavaClassName()
Returns:
String is the name of the Java class that represents this datatype

getNativeType

java.lang.String getNativeType()
Returns:
String is the native type this DataType will map to.

isPhysical

boolean isPhysical()
Returns a boolean indicating if this a physical data type.

Returns:
boolean

getPrecisionLength

int getPrecisionLength()
Returns an int indicating the precision length. Default to MetadataConstants.NOT_DEFINED_INT if not set.

Returns:
int

getRadix

int getRadix()
Returns an int indicating the radix. Default to MetadataConstants.NOT_DEFINED_INT if not set.

Returns:
int

getFixedPrecisionLength

boolean getFixedPrecisionLength()
Returns a boolean indicating whether precision length is fixed. Default to false;

Returns:
boolean

getSearchType

short getSearchType()
Returns a short indicating the serach typr.

Returns:
short

getPath

java.lang.String getPath()
Returns a string indicating the path.

Returns:
String

getElements

java.util.List getElements()
Returns a list of type DataTypeElement.

Returns:
List

getRuntimeType

DataType getRuntimeType()
Returns Runtime type that this datatype is mapped to. If this datatype is Runtime type, return null.

Returns:
DataType reference

isRuntimeType

boolean isRuntimeType()
Returns true if this datatype is Runtime Type, false otherwise.

Returns:
boolean


Copyright © 2009. All Rights Reserved.