com.metamatrix.metadata.runtime.impl
Class DatatypeRecordImpl

java.lang.Object
  extended by com.metamatrix.metadata.runtime.impl.AbstractMetadataRecord
      extended by com.metamatrix.metadata.runtime.impl.DatatypeRecordImpl
All Implemented Interfaces:
DatatypeRecord, MetadataRecord, java.io.Serializable

public class DatatypeRecordImpl
extends AbstractMetadataRecord
implements DatatypeRecord

ColumnRecordImpl

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.metamatrix.modeler.core.metadata.runtime.DatatypeRecord
DatatypeRecord.MetadataFieldNames
 
Nested classes/interfaces inherited from interface com.metamatrix.modeler.core.metadata.runtime.MetadataRecord
MetadataRecord.MetadataRecordProperties
 
Field Summary
 
Fields inherited from class com.metamatrix.metadata.runtime.impl.AbstractMetadataRecord
delegate, eObject
 
Constructor Summary
  DatatypeRecordImpl()
           
protected DatatypeRecordImpl(MetadataRecordDelegate delegate)
           
 
Method Summary
 java.lang.String getBasetypeID()
          Return a string that uniquely identifies the datatype for which this datatype is an extension/restriction.
 java.lang.String getBasetypeName()
          Return the name of the datatype for which this datatype is an extension/restriction.
 java.lang.String getDatatypeID()
          Return a string that uniquely identifies the datatype.
 java.lang.String getJavaClassName()
          Returns the name of the Java class that represents this datatype
 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 getModelName()
          Return the name of the model in which this entity exists.
 java.lang.String getName()
          Get entity short name
 short getNullType()
          Returns a short indicating if the element can be set to null.
 int getPrecisionLength()
          Returns an int indicating the precision length.
 java.lang.String getPrimitiveTypeID()
          Return a string that uniquely identifies the built-in primitive datatype for which this datatype is an extension/restriction.
 int getRadix()
          Returns an int indicating the radix.
 java.lang.String getRuntimeTypeName()
          Returns the name of the 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.
 java.util.List getVarietyProps()
          Depending on the value of the variety type additional properties may be defined.
 short getVarietyType()
          Returns the variety used to characterize the
 boolean isAutoIncrement()
          Returns a boolean indicating if the element is auto incremented by the database.
 boolean isBuiltin()
          Return whether this type represents a built-in.
 boolean isCaseSensitive()
          Returns a boolean indicating if the element data is case sensitive.
 boolean isSigned()
          Returns a boolean indicating if the element data is signed.
 void setAutoIncrement(boolean b)
           
 void setBasetypeID(java.lang.String string)
           
 void setCaseSensitive(boolean b)
           
 void setDatatypeID(java.lang.String string)
           
 void setJavaClassName(java.lang.String string)
           
 void setLength(int i)
           
 void setNullType(short s)
           
 void setPrecisionLength(int i)
           
 void setPrimitiveTypeID(java.lang.String string)
           
 void setRadix(int i)
           
 void setRuntimeTypeName(java.lang.String string)
           
 void setScale(int i)
           
 void setSearchType(short s)
           
 void setSigned(boolean b)
           
 void setType(short s)
           
 void setVarietyProps(java.util.List list)
           
 void setVarietyType(short s)
           
 java.lang.String toString()
           
 
Methods inherited from class com.metamatrix.metadata.runtime.impl.AbstractMetadataRecord
equals, getEObject, getFullName, getIndexVersion, getNameInSource, getParentFullName, getParentPathString, getParentUUID, getPath, getPathString, getPropertyValue, getRecordType, getResourcePath, getUUID, hashCode, setEObjectFinder, setFullName, setIndexVersion, setName, setNameInSource, setParentUUID, setPropertyValue, setRecordType, setResourcePath, setUUID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.metamatrix.modeler.core.metadata.runtime.MetadataRecord
getEObject, getFullName, getNameInSource, getParentFullName, getParentPathString, getParentUUID, getPath, getPathString, getPropertyValue, getRecordType, getResourcePath, getUUID, setPropertyValue
 

Constructor Detail

DatatypeRecordImpl

public DatatypeRecordImpl()

DatatypeRecordImpl

protected DatatypeRecordImpl(MetadataRecordDelegate delegate)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: MetadataRecord
Get entity short name

Specified by:
getName in interface MetadataRecord
Overrides:
getName in class AbstractMetadataRecord
Returns:
short name of the entity
See Also:
MetadataRecord.getName()

getModelName

public java.lang.String getModelName()
Description copied from interface: MetadataRecord
Return the name of the model in which this entity exists.

Specified by:
getModelName in interface MetadataRecord
Overrides:
getModelName in class AbstractMetadataRecord
Returns:
name of the containing model
See Also:
MetadataRecord.getModelName()

getLength

public int getLength()
Description copied from interface: DatatypeRecord
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. The value of length is a non-negative integer.

Specified by:
getLength in interface DatatypeRecord
Returns:
int
See Also:
DatatypeRecord.getLength()

getPrecisionLength

public int getPrecisionLength()
Description copied from interface: DatatypeRecord
Returns an int indicating the precision length. Default to MetadataConstants.NOT_DEFINED_INT if not set.

Specified by:
getPrecisionLength in interface DatatypeRecord
Returns:
int
See Also:
DatatypeRecord.getPrecisionLength()

getScale

public int getScale()
Description copied from interface: DatatypeRecord
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).

Specified by:
getScale in interface DatatypeRecord
Returns:
int
See Also:
DatatypeRecord.getScale()

getRadix

public int getRadix()
Description copied from interface: DatatypeRecord
Returns an int indicating the radix. Default to MetadataConstants.NOT_DEFINED_INT if not set.

Specified by:
getRadix in interface DatatypeRecord
Returns:
int
See Also:
DatatypeRecord.getRadix()

isSigned

public boolean isSigned()
Description copied from interface: DatatypeRecord
Returns a boolean indicating if the element data is signed.

Specified by:
isSigned in interface DatatypeRecord
Returns:
boolean
See Also:
DatatypeRecord.isSigned()

isAutoIncrement

public boolean isAutoIncrement()
Description copied from interface: DatatypeRecord
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.

Specified by:
isAutoIncrement in interface DatatypeRecord
Returns:
boolean
See Also:
DatatypeRecord.isAutoIncrement()

isCaseSensitive

public boolean isCaseSensitive()
Description copied from interface: DatatypeRecord
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.

Specified by:
isCaseSensitive in interface DatatypeRecord
Returns:
boolean
See Also:
DatatypeRecord.isCaseSensitive()

getType

public short getType()
Description copied from interface: DatatypeRecord
Return short indicating the type.

Specified by:
getType in interface DatatypeRecord
Returns:
short
See Also:
DatatypeRecord.getType()

isBuiltin

public boolean isBuiltin()
Description copied from interface: DatatypeRecord
Return whether this type represents a built-in.

Specified by:
isBuiltin in interface DatatypeRecord
See Also:
DatatypeRecord.isBuiltin()

getSearchType

public short getSearchType()
Description copied from interface: DatatypeRecord
Returns a short indicating the serach typr.

Specified by:
getSearchType in interface DatatypeRecord
Returns:
short
See Also:
DatatypeRecord.getSearchType()

getNullType

public short getNullType()
Description copied from interface: DatatypeRecord
Returns a short indicating if the element can be set to null.

Specified by:
getNullType in interface DatatypeRecord
Returns:
short
See Also:
DatatypeRecord.getNullType()

getJavaClassName

public java.lang.String getJavaClassName()
Description copied from interface: DatatypeRecord
Returns the name of the Java class that represents this datatype

Specified by:
getJavaClassName in interface DatatypeRecord
Returns:
String is the name of the Java class
See Also:
DatatypeRecord.getJavaClassName()

getRuntimeTypeName

public java.lang.String getRuntimeTypeName()
Description copied from interface: DatatypeRecord
Returns the name of the runtime type that this datatype is mapped to.

Specified by:
getRuntimeTypeName in interface DatatypeRecord
Returns:
runtime type name
See Also:
DatatypeRecord.getRuntimeTypeName()

getDatatypeID

public java.lang.String getDatatypeID()
Description copied from interface: DatatypeRecord
Return a string that uniquely identifies the datatype. The string typically defines a URI reference constructed as follows:

1. the base URI of the XML Schema namespace 2. the fragment identifier defining the name of the datatype

Specified by:
getDatatypeID in interface DatatypeRecord
Returns:
String the identifier
See Also:
DatatypeRecord.getDatatypeID()

getBasetypeID

public java.lang.String getBasetypeID()
Description copied from interface: DatatypeRecord
Return a string that uniquely identifies the datatype for which this datatype is an extension/restriction. If this datatype has no base or supertype then null is returned. The string typically defines a URI reference constructed as follows:

1. the base URI of the XML Schema namespace 2. the fragment identifier defining the name of the datatype

Specified by:
getBasetypeID in interface DatatypeRecord
Returns:
String the identifier
See Also:
DatatypeRecord.getBasetypeID()

getBasetypeName

public java.lang.String getBasetypeName()
Description copied from interface: DatatypeRecord
Return the name of the datatype for which this datatype is an extension/restriction. If this datatype has no base or supertype then null is returned.

The implementation simply computes the fragment from the DatatypeRecord.getBasetypeID().

Specified by:
getBasetypeName in interface DatatypeRecord
Returns:
String the name
See Also:
DatatypeRecord.getBasetypeName()

getPrimitiveTypeID

public java.lang.String getPrimitiveTypeID()
Description copied from interface: DatatypeRecord
Return a string that uniquely identifies the built-in primitive datatype for which this datatype is an extension/restriction. If this datatype has no base or supertype then null is returned. The string typically defines a URI reference constructed as follows:

1. the base URI of the XML Schema namespace 2. the fragment identifier defining the name of the datatype

Specified by:
getPrimitiveTypeID in interface DatatypeRecord
Returns:
String the identifier
Since:
4.3
See Also:
DatatypeRecord.getPrimitiveTypeID()

getVarietyType

public short getVarietyType()
Description copied from interface: DatatypeRecord
Returns the variety used to characterize the

Specified by:
getVarietyType in interface DatatypeRecord
Returns:
short
See Also:
DatatypeRecord.getVarietyType()

getVarietyProps

public java.util.List getVarietyProps()
Description copied from interface: DatatypeRecord
Depending on the value of the variety type additional properties may be defined.

Specified by:
getVarietyProps in interface DatatypeRecord
Returns:
List
See Also:
DatatypeRecord.getVarietyProps()

setBasetypeID

public void setBasetypeID(java.lang.String string)
Parameters:
string -

setPrimitiveTypeID

public void setPrimitiveTypeID(java.lang.String string)
Parameters:
string -

setAutoIncrement

public void setAutoIncrement(boolean b)
Parameters:
b -

setCaseSensitive

public void setCaseSensitive(boolean b)
Parameters:
b -

setSigned

public void setSigned(boolean b)
Parameters:
b -

setJavaClassName

public void setJavaClassName(java.lang.String string)
Parameters:
string -

setLength

public void setLength(int i)
Parameters:
i -

setNullType

public void setNullType(short s)
Parameters:
s -

setPrecisionLength

public void setPrecisionLength(int i)
Parameters:
i -

setRadix

public void setRadix(int i)
Parameters:
i -

setRuntimeTypeName

public void setRuntimeTypeName(java.lang.String string)
Parameters:
string -

setScale

public void setScale(int i)
Parameters:
i -

setSearchType

public void setSearchType(short s)
Parameters:
s -

setType

public void setType(short s)
Parameters:
s -

setDatatypeID

public void setDatatypeID(java.lang.String string)
Parameters:
string -

setVarietyProps

public void setVarietyProps(java.util.List list)
Parameters:
list -

setVarietyType

public void setVarietyType(short s)
Parameters:
s -

toString

public java.lang.String toString()
Overrides:
toString in class AbstractMetadataRecord


Copyright © 2009. All Rights Reserved.