<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: jack  
    $Date: 2014-7-22 下午2:12:21  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_DOC_LAYOUT_CONFIG_LOV">
    <bm:fields>
        <bm:field name="lov_config_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LOV_CONFIG_ID" prompt="HLS_DOC_LAYOUT_CONFIG_LOV.LOV_CONFIG_ID"/>
        <bm:field name="config_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONFIG_ID" prompt="HLS_DOC_LAYOUT_CONFIG_LOV.CONFIG_ID"/>
        <bm:field name="lov_col_for_query" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_COL_FOR_QUERY" prompt="HLS_DOC_LAYOUT_CONFIG_LOV.LOV_COL_FOR_QUERY"/>
        <bm:field name="lov_col_for_display" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_COL_FOR_DISPLAY" prompt="HLS_DOC_LAYOUT_CONFIG_LOV.LOV_COL_FOR_DISPLAY"/>
        <bm:field name="lov_col_display_width" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LOV_COL_DISPLAY_WIDTH" prompt="HLS_DOC_LAYOUT_CONFIG_LOV.LOV_COL_DISPLAY_WIDTH"/>
        <bm:field name="lov_data_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_DATA_TYPE" prompt="HLS_DOC_LAYOUT_CONFIG_LOV.LOV_DATA_TYPE"/>
        <bm:field name="lov_col_prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_COL_PROMPT" prompt="HLS_DOC_LAYOUT_CONFIG_LOV.LOV_COL_PROMPT"/>
        <bm:field name="lov_col_sequence" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LOV_COL_SEQUENCE" prompt="HLS_DOC_LAYOUT_CONFIG_LOV.LOV_COL_SEQUENCE"/>
        <bm:field name="lov_col_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOV_COL_NAME" prompt="HLS_DOC_LAYOUT_CONFIG_LOV.LOV_COL_NAME"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="lov_config_id"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter name="config_id" enforceOperations="query" expression="t1.config_id=${@config_id}"/>
    </bm:data-filters>
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
	         BEGIN
			    hls_doc_layout_config_lov_pkg.init_layout_config_lov(p_config_id      =>${@config_id},
			                                                         p_col_name       =>${@lov_col_name},
			                                                         p_query_column   =>${@lov_col_for_query},
			                                                         p_dispaly_column =>${@lov_col_for_display},
			                                                         p_data_type      =>${@lov_data_type},
			                                                         p_width          =>${@lov_col_display_width},
			                                                         p_lov_prompt    =>${@lov_col_prompt},
			                                                         P_lov_sequence  =>${@lov_col_sequence},
			                                                         p_user_id        =>${/session/@user_id});
			END;
          ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
