<?xml version="1.0" encoding="UTF-8" ?>
<!--
  This is used to map the model types to
  DB2 types for generated code.
-->
<mappings name="DB2">
    <mapping>
        <from>String</from>
        <from>PrimitiveTypes::String</from>
        <from>UML2::String</from>
        <from>UMLTypes::String</from>
        <from>datatype::String</from>
        <from>datatypes::String</from>
        <to>VARCHAR(256)</to>
    </mapping>
    <mapping>
        <from>Date</from>
        <from>PrimitiveTypes::Date</from>
        <from>datatype::Date</from>
        <from>datatypes::Date</from>
        <to>DATE</to>
    </mapping>
    <mapping>
        <from>Time</from>
        <from>PrimitiveTypes::Time</from>
        <from>datatype::Time</from>
        <from>datatypes::Time</from>
        <to>TIME</to>
    </mapping>
    <mapping>
        <from>Timestamp</from>
        <from>DateTime</from>
        <from>PrimitiveTypes::Timestamp</from>
        <from>PrimitiveTypes::DateTime</from>
        <from>datatype::Timestamp</from>
        <from>datatype::DateTime</from>
        <from>datatypes::Timestamp</from>
        <from>datatypes::DateTime</from>
        <to>TIMESTAMP</to>
    </mapping>
    <mapping>
        <from>char</from>
        <from>Character</from>
        <from>Java::char</from>
        <from>PrimitiveTypes::char</from>
        <from>PrimitiveTypes::Character</from>
        <from>datatype::char</from>
        <from>datatype::Character</from>
        <from>datatypes::char</from>
        <from>datatypes::Character</from>
        <to>CHAR</to>
    </mapping>
    <mapping>
        <from>byte</from>
        <from>Byte</from>
        <from>Java::byte</from>
        <from>PrimitiveTypes::byte</from>
        <from>PrimitiveTypes::Byte</from>
        <from>datatype::byte</from>
        <from>datatype::Byte</from>
        <from>datatypes::byte</from>
        <from>datatypes::Byte</from>
        <to>CHAR BYTE</to>
    </mapping>
    <mapping>
        <from>short</from>
        <from>Short</from>
        <from>Java::short</from>
        <from>PrimitiveTypes::short</from>
        <from>PrimitiveTypes::Short</from>
        <from>datatype::short</from>
        <from>datatype::Short</from>
        <from>datatypes::short</from>
        <from>datatypes::Short</from>
        <to>SMALLINT</to>
    </mapping>
    <mapping>
        <from>int</from>
        <from>Integer</from>
        <from>Java::int</from>
        <from>PrimitiveTypes::int</from>
        <from>PrimitiveTypes::Integer</from>
        <from>UML2::Integer</from>
        <from>datatype::int</from>
        <from>datatype::Integer</from>
        <from>datatypes::int</from>
        <from>datatypes::Integer</from>
        <to>INTEGER</to>
    </mapping>
    <mapping>
        <from>long</from>
        <from>Long</from>
        <from>Java::long</from>
        <from>PrimitiveTypes::long</from>
        <from>PrimitiveTypes::Long</from>
        <from>UML2::UnlimitedNatural</from>
        <from>datatype::long</from>
        <from>datatype::Long</from>
        <from>datatypes::long</from>
        <from>datatypes::Long</from>
        <to>BIGINT</to>
    </mapping>
    <mapping>
        <from>float</from>
        <from>Float</from>
        <from>Java::float</from>
        <from>PrimitiveTypes::float</from>
        <from>PrimitiveTypes::Float</from>
        <from>datatype::float</from>
        <from>datatype::Float</from>
        <from>datatypes::float</from>
        <from>datatypes::Float</from>
        <to>REAL</to>
    </mapping>
    <mapping>
        <from>double</from>
        <from>Double</from>
        <from>Money</from>
        <from>Java::double</from>
        <from>PrimitiveTypes::double</from>
        <from>PrimitiveTypes::Double</from>
        <from>PrimitiveTypes::Money</from>
        <from>datatype::double</from>
        <from>datatype::Double</from>
        <from>datatypes::double</from>
        <from>datatypes::Double</from>
        <from>datatype::Money</from>
        <to>DOUBLE</to>
    </mapping>
    <mapping>
        <from>boolean</from>
        <from>Boolean</from>
        <from>Java::boolean</from>
        <from>PrimitiveTypes::boolean</from>
        <from>PrimitiveTypes::Boolean</from>
        <from>UML2::Boolean</from>
        <from>datatype::boolean</from>
        <from>datatype::Boolean</from>
        <from>datatypes::boolean</from>
        <from>datatypes::Boolean</from>
        <to>SMALLINT</to>
    </mapping>
    <mapping>
        <from>Decimal</from>
        <from>decimal</from>
        <from>PrimitiveTypes::Decimal</from>
        <from>PrimitiveTypes::decimal</from>
        <from>datatype::Decimal</from>
        <from>datatype::decimal</from>
        <from>datatypes::Decimal</from>
        <from>datatypes::decimal</from>
        <to>DECIMAL</to>
    </mapping>
    <mapping>
        <from>Clob</from>
        <from>PrimitiveTypes::Clob</from>
        <from>datatype::Clob</from>
        <from>datatypes::Clob</from>
        <to>CLOB</to>
    </mapping>
    <mapping>
        <from>Blob</from>
        <from>PrimitiveTypes::Blob</from>
        <from>datatype::Blob</from>
        <from>datatypes::Blob</from>
        <to>BLOB</to>
    </mapping>
</mappings>
