<?xml version="1.0" encoding="UTF-8" ?>
<!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="IncomeThreshold"
        table="INCOME_THRESHOLD"
        mutable="false">

        <cache usage="read-only" />

        <id name="identifier"
            type="big_decimal"
            column="ID">
            <generator class="assigned" />
        </id>

        <property name="year" type="integer" not-null="true"
            insert="false" update="false" column="INCOME_THRESHOLD_YEAR">
        </property>

        <property name="aaThreshold" type="big_decimal"
            insert="false" update="false" column="AID_AND_ATTENDANCE_THRESHOLD">
        </property>

        <property name="exemptAmount" type="big_decimal"
            insert="false" update="false" column="EXEMPT_AMOUNT">
        </property>

        <property name="medicalExpenseDeductible" type="big_decimal"
            insert="false" update="false" column="MEDICAL_EXPENSE_DEDUCTIBLE">
        </property>

        <property name="childIncomeExclusion" type="big_decimal"
            insert="false" update="false" column="CHILD_INCOME_EXCLUSION">
        </property>

        <property name="dependent" type="big_decimal"
            insert="false" update="false" column="DEPENDENT">
        </property>

        <property name="addDependentThreshold" type="big_decimal"
            insert="false" update="false" column="ADD_DEPENDENT_THRESHOLD">
        </property>

        <property name="inpatientPerDiem" type="big_decimal"
            insert="false" update="false" column="INPATIENT_PER_DIEM">
        </property>
		
        <property name="propertyThreshold" type="big_decimal"
            insert="false" update="false" column="PROPERTY_THRESHOLD">
        </property>

        <property name="pensionThreshold" type="big_decimal"
            insert="false" update="false" column="PENSION_THRESHOLD">
        </property>

        <property name="pension1Dependent" type="big_decimal"
            insert="false" update="false" column="PENSION_1_DEPENDENT">
        </property>

        <property name="addDependentPension" type="big_decimal"
            insert="false" update="false" column="ADD_DEPENDENT_PENSION">
        </property>

        <property name="ninetyDayHospitalCopay" type="big_decimal"
            insert="false" update="false" column="NINETY_DAY_HOSPITAL_COPAY">
        </property>

        <property name="add90DayHospitalDeductible" type="big_decimal"
            insert="false" update="false" column="ADD_90_DAY_HOSPITAL_COPAY">
        </property>
        
        <property name="ltcInpatientCopay" type="big_decimal"
            insert="false" update="false" column="LTC_INPATIENT_COPAY">
        </property>

        <property name="ltcOutpatientCopay" type="big_decimal"
            insert="false" update="false" column="LTC_OUTPATIENT_COPAY">
        </property>

        <property name="ltcDomiciliaryCopay" type="big_decimal"
            insert="false" update="false" column="LTC_DOMICILIARY_COPAY">
        </property>

        <property name="medicationCopay" type="big_decimal"
            insert="false" update="false" column="MEDICATION_COPAY">
        </property>

        <property name="medicationCopayAnnualCap" type="big_decimal"
            insert="false" update="false" column="MEDICATION_COPAY_ANNUAL_CAP">
        </property>
        
        <property name="outpatientPreventiveCopay" type="big_decimal"
            insert="false" update="false" column="OUTPATIENT_PREVENTIVE_COPAY">
        </property>

        <property name="outpatientSpecialtyCopay" type="big_decimal"
            insert="false" update="false" column="OUTPATIENT_SPECIALTY_COPAY">
        </property>

        <property name="outpatientCopay" type="big_decimal"
            insert="false" update="false" column="OUTPATIENT_BASIC_CARE_COPAY">
        </property>

        <property name="thresholdEffectiveDate" type="java.util.Date"
            insert="false" update="false" column="THRESHOLD_EFFECTIVE_DATE">
        </property>

    </class>

    <query name="incomeThreshold_getByYear">
        FROM   IncomeThreshold incomeThreshold
        WHERE  incomeThreshold.year = :year
    </query>

    <query name="incomeThreshold_getAll">
        FROM   IncomeThreshold incomeThreshold ORDER BY incomeThreshold.year
    </query>

</hibernate-mapping>