org.eclipse.datatools.connectivity.oda.design
Interface DataElementAttributes


public interface DataElementAttributes

Common attributes for a data element.

The following features are supported:

See Also:
DesignPackage.getDataElementAttributes()

Field Summary
static java.lang.String copyright
           
 
Method Summary
 boolean allowsNull()
          Indicates whether this data element is defined to allow a null value.
 java.lang.String getName()
          Returns the value of the 'Name' attribute.
 int getNativeDataTypeCode()
          Returns the value of the 'Native Data Type Code' attribute.
 ElementNullability getNullability()
          Returns the value of the 'Nullability' attribute.
 int getPosition()
          Returns the value of the 'Position' attribute.
 int getPrecision()
          Returns the value of the 'Precision' attribute.
 int getScale()
          Returns the value of the 'Scale' attribute.
 DataElementUIHints getUiHints()
          Returns the value of the 'Ui Hints' containment reference.
 boolean isSetNativeDataTypeCode()
          Returns whether the value of the 'Native Data Type Code' attribute is set.
 boolean isSetNullability()
          Returns whether the value of the 'Nullability' attribute is set.
 boolean isSetPosition()
          Returns whether the value of the 'Position' attribute is set.
 boolean isSetPrecision()
          Returns whether the value of the 'Precision' attribute is set.
 boolean isSetScale()
          Returns whether the value of the 'Scale' attribute is set.
 void setApplicablePrecision(int value, OdaScalarDataType odaDataType)
          Sets the value of the 'Precision' attribute that is applicable for the given ODA data type.
 void setApplicableScale(int value, OdaScalarDataType odaDataType)
          Sets the value of the 'Scale' attribute that is applicable for the given ODA data type.
 void setName(java.lang.String value)
          Sets the value of the 'Name' attribute.
 void setNativeDataTypeCode(int value)
          Sets the value of the 'Native Data Type Code' attribute.
 void setNullability(ElementNullability value)
          Sets the value of the 'Nullability' attribute.
 void setPosition(int value)
          Sets the value of the 'Position' attribute.
 void setPrecision(int value)
          Sets the value of the 'Precision' attribute.
 void setScale(int value)
          Sets the value of the 'Scale' attribute.
 void setUiDescription(java.lang.String value)
          Sets the value of the Description attribute in the element's UI hints.
 void setUiDisplayName(java.lang.String value)
          Sets the value of the Display Name attribute in the element's UI hints.
 void setUiHints(DataElementUIHints value)
          Sets the value of the 'Ui Hints' containment reference.
 void unsetNativeDataTypeCode()
          Unsets the value of the 'Native Data Type Code' attribute.
 void unsetNullability()
          Unsets the value of the 'Nullability' attribute.
 void unsetPosition()
          Unsets the value of the 'Position' attribute.
 void unsetPrecision()
          Unsets the value of the 'Precision' attribute.
 void unsetScale()
          Unsets the value of the 'Scale' attribute.
 

Field Detail

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values
Method Detail

setApplicablePrecision

public void setApplicablePrecision(int value,
                                   OdaScalarDataType odaDataType)
Sets the value of the 'Precision' attribute that is applicable for the given ODA data type. This provides the application logic on setting the applicable value for the given data type, and would return the applicable value in getPrecision method.

Parameters:
value - the new value of the 'Precision' attribute.
odaDataType - the ODA data type of this data element
See Also:
#setPrecision(), isSetPrecision(), unsetPrecision(), getPrecision()

setApplicableScale

public void setApplicableScale(int value,
                               OdaScalarDataType odaDataType)
Sets the value of the 'Scale' attribute that is applicable for the given ODA data type. This provides the application logic on setting the applicable value for the given data type, and would return the applicable value in getScale method.

Parameters:
value - the new value of the 'Scale' attribute.
odaDataType - the ODA data type of this data element
See Also:
#setScale(), isSetScale(), unsetScale(), getScale()

allowsNull

public boolean allowsNull()
Indicates whether this data element is defined to allow a null value. Defaults to false if its nullability is unknown.

Returns:
true if the data element allows a null value; false otherwise.
See Also:
getNullability()

getName

public java.lang.String getName()
Returns the value of the 'Name' attribute. A name that uniquely identifies this data element. If a data element can only be identified by position, this name may be empty.

Returns:
the value of the 'Name' attribute.
See Also:
setName(String), DesignPackage.getDataElementAttributes_Name()

setName

public void setName(java.lang.String value)
Sets the value of the 'Name' attribute.

Parameters:
value - the new value of the 'Name' attribute.
See Also:
getName()

getPosition

public int getPosition()
Returns the value of the 'Position' attribute. The 1-based index position (left-to-right order) within a collection of data elements. The position is defined per the underlying data source, and is not necessarily sequential. For example, a query may access 3 columns in a result set, but the data access design may choose to expose only column 2. In this case, only one column element with postion 2 is defined in the result set definition.

Returns:
the value of the 'Position' attribute.
See Also:
isSetPosition(), unsetPosition(), setPosition(int), DesignPackage.getDataElementAttributes_Position()

setPosition

public void setPosition(int value)
Sets the value of the 'Position' attribute.

Parameters:
value - the new value of the 'Position' attribute.
See Also:
isSetPosition(), unsetPosition(), getPosition()

unsetPosition

public void unsetPosition()
Unsets the value of the 'Position' attribute.

See Also:
isSetPosition(), getPosition(), setPosition(int)

isSetPosition

public boolean isSetPosition()
Returns whether the value of the 'Position' attribute is set.

Returns:
whether the value of the 'Position' attribute is set.
See Also:
unsetPosition(), getPosition(), setPosition(int)

getNativeDataTypeCode

public int getNativeDataTypeCode()
Returns the value of the 'Native Data Type Code' attribute. The default value is "0". Native data type code of the data element. If none or unknown value (0) is specified, the data element is mapped to an ODA String data type by default. The native type code value is implementation-specific to individual ODA driver, which must support its mapping to one or more ODA data types. The supported native-ODA data type mapping must be defined in the ODA extension's plugin.xml .

Returns:
the value of the 'Native Data Type Code' attribute.
See Also:
isSetNativeDataTypeCode(), unsetNativeDataTypeCode(), setNativeDataTypeCode(int), DesignPackage.getDataElementAttributes_NativeDataTypeCode()

setNativeDataTypeCode

public void setNativeDataTypeCode(int value)
Sets the value of the 'Native Data Type Code' attribute.

Parameters:
value - the new value of the 'Native Data Type Code' attribute.
See Also:
isSetNativeDataTypeCode(), unsetNativeDataTypeCode(), getNativeDataTypeCode()

unsetNativeDataTypeCode

public void unsetNativeDataTypeCode()
Unsets the value of the 'Native Data Type Code' attribute.

See Also:
isSetNativeDataTypeCode(), getNativeDataTypeCode(), setNativeDataTypeCode(int)

isSetNativeDataTypeCode

public boolean isSetNativeDataTypeCode()
Returns whether the value of the 'Native Data Type Code' attribute is set.

Returns:
whether the value of the 'Native Data Type Code' attribute is set.
See Also:
unsetNativeDataTypeCode(), getNativeDataTypeCode(), setNativeDataTypeCode(int)

getPrecision

public int getPrecision()
Returns the value of the 'Precision' attribute. The default value is "-1". Maximum number of decimal digits in a numeric value, or the length of a non-numeric value. A value of -1 indicates this attribute is not applicable.

Returns:
the value of the 'Precision' attribute.
See Also:
isSetPrecision(), unsetPrecision(), setPrecision(int), DesignPackage.getDataElementAttributes_Precision()

setPrecision

public void setPrecision(int value)
Sets the value of the 'Precision' attribute.

Parameters:
value - the new value of the 'Precision' attribute.
See Also:
isSetPrecision(), unsetPrecision(), getPrecision()

unsetPrecision

public void unsetPrecision()
Unsets the value of the 'Precision' attribute.

See Also:
isSetPrecision(), getPrecision(), setPrecision(int)

isSetPrecision

public boolean isSetPrecision()
Returns whether the value of the 'Precision' attribute is set.

Returns:
whether the value of the 'Precision' attribute is set.
See Also:
unsetPrecision(), getPrecision(), setPrecision(int)

getScale

public int getScale()
Returns the value of the 'Scale' attribute. The default value is "-1". Maximum number of digits to the right of the decimal point. A value of -1 indicates this attribute is not applicable.

Returns:
the value of the 'Scale' attribute.
See Also:
isSetScale(), unsetScale(), setScale(int), DesignPackage.getDataElementAttributes_Scale()

setScale

public void setScale(int value)
Sets the value of the 'Scale' attribute.

Parameters:
value - the new value of the 'Scale' attribute.
See Also:
isSetScale(), unsetScale(), getScale()

unsetScale

public void unsetScale()
Unsets the value of the 'Scale' attribute.

See Also:
isSetScale(), getScale(), setScale(int)

isSetScale

public boolean isSetScale()
Returns whether the value of the 'Scale' attribute is set.

Returns:
whether the value of the 'Scale' attribute is set.
See Also:
unsetScale(), getScale(), setScale(int)

getNullability

public ElementNullability getNullability()
Returns the value of the 'Nullability' attribute. The default value is "Unknown". The literals are from the enumeration ElementNullability.

Returns:
the value of the 'Nullability' attribute.
See Also:
ElementNullability, isSetNullability(), unsetNullability(), setNullability(ElementNullability), DesignPackage.getDataElementAttributes_Nullability()

setNullability

public void setNullability(ElementNullability value)
Sets the value of the 'Nullability' attribute.

Parameters:
value - the new value of the 'Nullability' attribute.
See Also:
ElementNullability, isSetNullability(), unsetNullability(), getNullability()

unsetNullability

public void unsetNullability()
Unsets the value of the 'Nullability' attribute.

See Also:
isSetNullability(), getNullability(), setNullability(ElementNullability)

isSetNullability

public boolean isSetNullability()
Returns whether the value of the 'Nullability' attribute is set.

Returns:
whether the value of the 'Nullability' attribute is set.
See Also:
unsetNullability(), getNullability(), setNullability(ElementNullability)

getUiHints

public DataElementUIHints getUiHints()
Returns the value of the 'Ui Hints' containment reference.

Returns:
the value of the 'Ui Hints' containment reference.
See Also:
setUiHints(DataElementUIHints), DesignPackage.getDataElementAttributes_UiHints()

setUiHints

public void setUiHints(DataElementUIHints value)
Sets the value of the 'Ui Hints' containment reference.

Parameters:
value - the new value of the 'Ui Hints' containment reference.
See Also:
getUiHints()

setUiDisplayName

public void setUiDisplayName(java.lang.String value)
Sets the value of the Display Name attribute in the element's UI hints.

Parameters:
value - the new value of the 'Display Name' attribute.
See Also:
setUiHints(DataElementUIHints)

setUiDescription

public void setUiDescription(java.lang.String value)
Sets the value of the Description attribute in the element's UI hints.

Parameters:
value - the new value of the 'Description' attribute.
See Also:
setUiHints(DataElementUIHints)


Copyright © 2007 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.