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

All Superinterfaces:
  org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier

    public interface DataElementAttributes

extends org.eclipse.emf.ecore.EObject

Common attributes for a data element.

The following features are supported:

- `Identifier`
- `Name`
- `Position`
- `Native Data Type Code`
- `Precision`
- `Scale`
- `Nullability`
- `Ui Hints`

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.
`DataElementIdentifier` `getIdentifier()` Returns the value of the 'Identifier' containment reference.
`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` `setIdentifier(DataElementIdentifier value)` Sets the value of the '`Identifier`' containment reference.
`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.

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Field Detail

### copyright

    static final java.lang.String copyright

  See Also:
    Constant Field Values

Method Detail

### getIdentifier

    DataElementIdentifier getIdentifier()

  Returns the value of the 'Identifier' containment reference. Uniquely identifies this data element by name and/or position.

  Returns:
    the value of the 'Identifier' containment reference.
  Since:
    3.3.2
  See Also:
    `setIdentifier(DataElementIdentifier)`, `DesignPackage.getDataElementAttributes_Identifier()`

### setIdentifier

    void setIdentifier(DataElementIdentifier value)

  Sets the value of the '`Identifier`' containment reference.

  Parameters:
    `value` - the new value of the 'Identifier' containment reference.
  Since:
    3.3.2
  See Also:
    `getIdentifier()`

### setApplicablePrecision

    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

    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

    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

    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

    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

    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

    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

    void unsetPosition()

  Unsets the value of the '`Position`' attribute.

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

### isSetPosition

    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

    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

    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

    void unsetNativeDataTypeCode()

  Unsets the value of the '`Native Data Type Code`' attribute.

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

### isSetNativeDataTypeCode

    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

    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

    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

    void unsetPrecision()

  Unsets the value of the '`Precision`' attribute.

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

### isSetPrecision

    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

    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

    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

    void unsetScale()

  Unsets the value of the '`Scale`' attribute.

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

### isSetScale

    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

    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

    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

    void unsetNullability()

  Unsets the value of the '`Nullability`' attribute.

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

### isSetNullability

    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

    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

    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

    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

    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)`