<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2013-11-20 下午03:11:50  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_DOCUMENT_COMPARE" defaultOrderBy="t1.order_seq">
    <bm:fields>
        <bm:field name="compare_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPARE_ID" prompt="HLS_DOCUMENT_COMPARE.COMPARE_ID"/>
        <bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME" prompt="HLS_DOCUMENT_COMPARE.TABLE_NAME"/>
        <bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME" prompt="HLS_DOCUMENT_COMPARE.COLUMN_NAME"/>
        <bm:field name="change_req_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHANGE_REQ_ID"/>
        <bm:field name="from_table_pk" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FROM_TABLE_PK" prompt="HLS_DOCUMENT_COMPARE.FROM_TABLE_PK"/>
        <bm:field name="to_table_pk" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TO_TABLE_PK" prompt="HLS_DOCUMENT_COMPARE.TO_TABLE_PK"/>
        <bm:field name="from_column_value" databaseType="VARCHAR2" datatype="java.lang.String" expression="hls_document_compare_pkg.from_column_value(p_from_column_value =&gt; t1.from_column_value)" physicalName="FROM_COLUMN_VALUE" prompt="HLS_DOCUMENT_COMPARE.FROM_COLUMN_VALUE"/>
        <bm:field name="to_column_value" databaseType="VARCHAR2" datatype="java.lang.String" expression="hls_document_compare_pkg.to_column_value(p_to_column_value =&gt; t1.to_column_value)" physicalName="TO_COLUMN_VALUE" prompt="HLS_DOCUMENT_COMPARE.TO_COLUMN_VALUE"/>
        <bm:field name="prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROMPT" prompt="HLS_DOCUMENT_COMPARE.PROMPT"/>
        <bm:field name="order_seq" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="HLS_DOCUMENT_COMPARE.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="HLS_DOCUMENT_COMPARE.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="HLS_DOCUMENT_COMPARE.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="HLS_DOCUMENT_COMPARE.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="HLS_DOCUMENT_COMPARE.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="HLS_DOCUMENT_COMPARE.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="HLS_DOCUMENT_COMPARE.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="HLS_DOCUMENT_COMPARE.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="HLS_DOCUMENT_COMPARE.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="HLS_DOCUMENT_COMPARE.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="HLS_DOCUMENT_COMPARE.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="HLS_DOCUMENT_COMPARE.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="HLS_DOCUMENT_COMPARE.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="HLS_DOCUMENT_COMPARE.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="HLS_DOCUMENT_COMPARE.REF_D05"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="compare_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="new_contract_id" queryExpression="change_req_id=${@new_contract_id}"/>
        <bm:query-field name="contract_id" queryExpression="change_req_id=${@contract_id}"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.table_name=&apos;CON_CONTRACT&apos; and (t1.from_column_value is not null or t1.from_column_value_name is not null or t1.to_column_value is not null or t1.to_column_value_name is not null)"/>
        <!-- <bm:data-filter enforceOperations="query" expression="t1.table_name=&apos;CON_CONTRACT&apos;"/> -->
    </bm:data-filters>
</bm:model>
