com.metamatrix.metadata.runtime.model
Class BasicElement

java.lang.Object
  extended by com.metamatrix.metadata.runtime.model.BasicMetadataObject
      extended by com.metamatrix.metadata.runtime.model.BasicElement
All Implemented Interfaces:
Element, MetadataObject, java.io.Serializable

public class BasicElement
extends BasicMetadataObject
implements Element

See Also:
Serialized Form

Constructor Summary
BasicElement(ElementID element, BasicVirtualDatabaseID virtualDBID)
          Call constructor to instantiate a runtime object by passing the RuntimeID that identifies the entity and the VIrtualDatabaseID that identifes the Virtual Database the object will be contained.
 
Method Summary
 DataType getActualDataType()
           
 java.lang.String getAlias()
          Return the alias.
 int getCharOctetLength()
           
 DataType getDataType()
          Returns the DataType this element is represented as.
 java.lang.Object getDefaultValue()
          Returns the default value in the object form based on the data type for this element.
 java.lang.String getDescription()
          Return the description.
 java.lang.String getFormat()
          Returns the format the data for this element should be displayed as.
 java.lang.String getLabel()
          Returns the label.
 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.
 Multiplicity getMultplicity()
          Returns the multiplicity this element can have.
 java.lang.String getNameInSource()
          Override the super method so that when the name is returned, it is the name and not the full path for an element
 short getNullType()
          Returns a short indicating if the element can be set to null.
 int getPosition()
           
 int getPrecisionLength()
           
 int getRadix()
           
 int getScale()
          Returns the scale, which is the number of significant digits to the right of the decimal point.
 short getSearchType()
          Return short indicating the search type supported on this element.
 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 isCurrency()
          Returns a boolean indicating if the element data represents currency.
 boolean isLengthFixed()
          Returns a boolean indicating if the length is fixed.
 boolean isPhysical()
          Returns a boolean indicating if this a physical element.
 boolean isSigned()
          Returns a boolean indicating if the element data is signed.
 void setAlias(java.lang.String alias)
           
 void setCharOctetLength(int charOctetLength)
           
 void setDataType(DataType type)
           
 void setDefaultValue(java.lang.String defaultValue)
           
 void setDescription(java.lang.String description)
           
 void setFormat(java.lang.String format)
           
 void setIsAutoIncrement(boolean isAutoIncremented)
           
 void setIsCaseSensitive(boolean isCaseSensitive)
           
 void setIsCurrency(boolean isCurrency)
           
 void setIsLengthFixed(boolean isLengthFixed)
           
 void setIsSigned(boolean isSigned)
           
 void setLabel(java.lang.String label)
           
 void setLength(int length)
           
 void setMaximumRange(java.lang.String maxRange)
           
 void setMinimumRange(java.lang.String minRange)
           
 void setMultplicity(Multiplicity multiplicity)
           
 void setNullType(short nullType)
           
 void setPhysical(boolean isPhysical)
           
 void setPosition(int position)
           
 void setPrecisionLength(int prcsnLength)
           
 void setRadix(int radix)
           
 void setScale(int scale)
           
 void setSearchType(short searchType)
           
 void setSupportsSelect(boolean sup_SELECT)
           
 void setSupportsSet(boolean sup_SET)
           
 void setSupportsSubscription(boolean sup_SUB)
           
 void setSupportsUpdate(boolean sup_UPDATE)
           
 boolean supportsSelect()
          Returns a boolean indicating if the element can be selected
 boolean supportsSet()
          Returns a boolean indicating if the element can be used in a SET operation.
 boolean supportsSubscription()
          Returns a boolean indicating if the element can be subscribed to.
 boolean supportsUpdate()
          Returns a boolean indicating if the element can be updated.
 
Methods inherited from class com.metamatrix.metadata.runtime.model.BasicMetadataObject
addProperty, clone, compareTo, equals, getCurrentProperties, getFullName, getID, getName, getPath, getProperties, getVirtualDatabaseID, hashCode, hasNameInSource, setID, setProperties, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.metamatrix.metadata.runtime.api.Element
hasNameInSource
 
Methods inherited from interface com.metamatrix.metadata.runtime.api.MetadataObject
clone, compareTo, equals, getFullName, getID, getName, getProperties, getVirtualDatabaseID, toString
 

Constructor Detail

BasicElement

public BasicElement(ElementID element,
                    BasicVirtualDatabaseID virtualDBID)
Call constructor to instantiate a runtime object by passing the RuntimeID that identifies the entity and the VIrtualDatabaseID that identifes the Virtual Database the object will be contained.

Method Detail

getDescription

public java.lang.String getDescription()
Description copied from interface: Element
Return the description.

Specified by:
getDescription in interface Element
Returns:
String

getNameInSource

public java.lang.String getNameInSource()
Override the super method so that when the name is returned, it is the name and not the full path for an element

Specified by:
getNameInSource in interface Element
Overrides:
getNameInSource in class BasicMetadataObject
Returns:
String is the name in source

getAlias

public java.lang.String getAlias()
Description copied from interface: Element
Return the alias.

Specified by:
getAlias in interface Element
Overrides:
getAlias in class BasicMetadataObject
Returns:
String alias

setAlias

public void setAlias(java.lang.String alias)

isPhysical

public boolean isPhysical()
Description copied from interface: Element
Returns a boolean indicating if this a physical element.

Specified by:
isPhysical in interface Element
Returns:
boolean

getLabel

public java.lang.String getLabel()
Description copied from interface: Element
Returns the label.

Specified by:
getLabel in interface Element
Returns:
String

getDataType

public DataType getDataType()
Description copied from interface: Element
Returns the DataType this element is represented as. If it is a user-defined type, the corresponding runtime type is returned.

Specified by:
getDataType in interface Element
Returns:
DataType

getActualDataType

public DataType getActualDataType()

getScale

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

getLength

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

Specified by:
getLength in interface Element
Returns:
int

isLengthFixed

public boolean isLengthFixed()
Description copied from interface: Element
Returns a boolean indicating if the length is fixed.

Specified by:
isLengthFixed in interface Element
Returns:
boolean

getNullType

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

Specified by:
getNullType in interface Element
Returns:
short
See Also:
MetadataConstants.NULL_TYPES

supportsSelect

public boolean supportsSelect()
Description copied from interface: Element
Returns a boolean indicating if the element can be selected

Specified by:
supportsSelect in interface Element
Returns:
boolean

supportsSet

public boolean supportsSet()
Description copied from interface: Element
Returns a boolean indicating if the element can be used in a SET operation.

Specified by:
supportsSet in interface Element
Returns:
boolean

supportsSubscription

public boolean supportsSubscription()
Description copied from interface: Element
Returns a boolean indicating if the element can be subscribed to.

Specified by:
supportsSubscription in interface Element
Returns:
boolean

supportsUpdate

public boolean supportsUpdate()
Description copied from interface: Element
Returns a boolean indicating if the element can be updated.

Specified by:
supportsUpdate in interface Element
Returns:
boolean

isCaseSensitive

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

isSigned

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

Specified by:
isSigned in interface Element
Returns:
boolean

isCurrency

public boolean isCurrency()
Description copied from interface: Element
Returns a boolean indicating if the element data represents currency.

Specified by:
isCurrency in interface Element
Returns:
boolean

isAutoIncrement

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

getMinimumRange

public java.lang.String getMinimumRange()
Description copied from interface: Element
Returns the minimum value that the element can represent.

Specified by:
getMinimumRange in interface Element
Returns:
String

getMaximumRange

public java.lang.String getMaximumRange()
Description copied from interface: Element
eturns the maximum value that the element can represent.

Specified by:
getMaximumRange in interface Element
Returns:
String

getSearchType

public short getSearchType()
Description copied from interface: Element
Return short indicating the search type supported on this element.

Specified by:
getSearchType in interface Element
Returns:
short
See Also:
MetadataConstants.SEARCH_TYPES

getFormat

public java.lang.String getFormat()
Description copied from interface: Element
Returns the format the data for this element should be displayed as.

Specified by:
getFormat in interface Element
Returns:
String

getMultplicity

public Multiplicity getMultplicity()
Description copied from interface: Element
Returns the multiplicity this element can have.

Specified by:
getMultplicity in interface Element
Returns:
Multiplicity

getDefaultValue

public java.lang.Object getDefaultValue()
Description copied from interface: Element
Returns the default value in the object form based on the data type for this element.

Specified by:
getDefaultValue in interface Element
Returns:
Object

getPrecisionLength

public int getPrecisionLength()
Specified by:
getPrecisionLength in interface Element

getRadix

public int getRadix()
Specified by:
getRadix in interface Element

getCharOctetLength

public int getCharOctetLength()
Specified by:
getCharOctetLength in interface Element

getPosition

public int getPosition()

setDescription

public void setDescription(java.lang.String description)

setPhysical

public void setPhysical(boolean isPhysical)

setLabel

public void setLabel(java.lang.String label)

setDataType

public void setDataType(DataType type)

setScale

public void setScale(int scale)

setLength

public void setLength(int length)

setIsLengthFixed

public void setIsLengthFixed(boolean isLengthFixed)

setNullType

public void setNullType(short nullType)

setSupportsSelect

public void setSupportsSelect(boolean sup_SELECT)

setSupportsSet

public void setSupportsSet(boolean sup_SET)

setSupportsSubscription

public void setSupportsSubscription(boolean sup_SUB)

setSupportsUpdate

public void setSupportsUpdate(boolean sup_UPDATE)

setIsCaseSensitive

public void setIsCaseSensitive(boolean isCaseSensitive)

setIsSigned

public void setIsSigned(boolean isSigned)

setIsCurrency

public void setIsCurrency(boolean isCurrency)

setIsAutoIncrement

public void setIsAutoIncrement(boolean isAutoIncremented)

setMinimumRange

public void setMinimumRange(java.lang.String minRange)

setMaximumRange

public void setMaximumRange(java.lang.String maxRange)

setSearchType

public void setSearchType(short searchType)

setFormat

public void setFormat(java.lang.String format)

setMultplicity

public void setMultplicity(Multiplicity multiplicity)

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)

setPrecisionLength

public void setPrecisionLength(int prcsnLength)

setRadix

public void setRadix(int radix)

setCharOctetLength

public void setCharOctetLength(int charOctetLength)

setPosition

public void setPosition(int position)


Copyright © 2009. All Rights Reserved.