<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping
    default-lazy="false"
    auto-import="true"
    default-access="property"
    default-cascade="all"
    package="gov.va.med.esr.common.model.financials">

    <class
        name="IncomeTestStatus"
        table="INCOME_TEST_DETAIL_H">

        <id
            name="identifier"
            type="big_decimal"
            column="INCOME_TEST_DETAIL_ID">
            
            <generator class="gov.va.med.fw.persistent.hibernate.BigSequenceGenerator">
                <param name="sequence">transaction_s</param>
            </generator>
        </id>

        <version
            name="version"
            type="java.lang.Integer"
            column="RECORD_MODIFIED_COUNT">
        </version>

        <many-to-one
            name="incomeTest"
            class="IncomeTest"
            cascade="none"
            not-null="true"
            insert="true"
            update="false">
          <column name="INCOME_TEST_ID" />
        </many-to-one>

        <property name="createdOn" column="RECORD_CREATED_DATE" type="timestamp" not-null="true" update="false"/>
        <property name="modifiedOn" column="RECORD_MODIFIED_DATE" type="timestamp" not-null="true"/>
		<property name="createdBy" column="RECORD_CREATED_BY" update="false" type="gov.va.med.fw.persistent.hibernate.AuditUserType"/> 
		<property name="modifiedBy" column="RECORD_MODIFIED_BY" type="gov.va.med.fw.persistent.hibernate.AuditUserType"/>
 		<property name="transactionType" column="TRANSACTION_TYPE_CODE" type="gov.va.med.fw.persistent.hibernate.TransactionUserType"/>
   		<property name="historyId" column="INCOME_TEST_DETAIL_H_ID" type="big_decimal" insert="false" update="false"/>

        <property
            name="completedDate"
            type="java.util.Date"
            insert="true"
            update="true"
            column="INCOME_TEST_COMPLETED_DATE">
        </property>

        <property
            name="lastEditedDate"
            type="java.util.Date"
            insert="true"
            update="true"
            column="INCOME_TEST_LAST_EDITED_DATE">
        </property>

        <many-to-one
            name="type"
            class="gov.va.med.esr.common.model.lookup.IncomeTestType"
            outer-join="false"
            not-null="true"
            cascade="none"
            insert="true"
            update="true">
            <column name="INCOME_TEST_TYPE_ID" />
        </many-to-one>

        <many-to-one
            name="status"
            class="gov.va.med.esr.common.model.lookup.MeansTestStatus"
            outer-join="false"
            cascade="none"
            insert="true"
            update="true">
            <column name="TEST_STATUS_TYPE_ID" />
        </many-to-one>

        <many-to-one
            name="determinedStatus"
            class="gov.va.med.esr.common.model.lookup.MeansTestStatus"
            outer-join="false"
            cascade="none"
            insert="true"
            update="true">
           <column name="TEST_DETMND_STATUS_TYPE_ID" />
        </many-to-one>

		<filter name="asOfDate"></filter>
		<filter name="priorToDate"></filter>
   </class>
</hibernate-mapping>
