<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping
        auto-import="false"
>
    <class
        name="magoffin.matt.ieat.domain.impl.UnitImpl"
        table="Unit"
    >
        <cache usage="read-write" />

        <id
            name="unitId"
            column="unitId"
            type="java.lang.Integer"
            unsaved-value="null"
        >
            <generator class="native">
                <param name="sequence">unit_id_seq</param>
              <!--  
                  To add non XDoclet generator parameters, create a file named 
                  hibernate-generator-params-UnitImpl.xml 
                  containing the additional parameters and place it in your merge dir. 
              --> 
            </generator>
        </id>

        <property
            name="value"
            type="java.lang.String"
            update="true"
            insert="true"
            column="value"
            length="64"
            not-null="true"
        />

        <property
            name="abbreviation"
            type="java.lang.String"
            update="true"
            insert="true"
            column="abbreviation"
            length="8"
            not-null="true"
        />

        <property
            name="mass"
            type="boolean"
            update="true"
            insert="true"
            column="mass"
        />

        <property
            name="toMetric"
            type="double"
            update="true"
            insert="true"
            column="toMetric"
        />

        <property
            name="toUS"
            type="double"
            update="true"
            insert="true"
            column="toUS"
        />

        <property
            name="toImperial"
            type="double"
            update="true"
            insert="true"
            column="toImperial"
        />

        <property
            name="systemId"
            type="java.lang.Integer"
            update="true"
            insert="true"
            column="systemId"
        />

        <!--
            To add non XDoclet property mappings, create a file named
                hibernate-properties-UnitImpl.xml
            containing the additional properties and place it in your merge dir.
        -->

    </class>

</hibernate-mapping>
