<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-6-18 下午03:47:44  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_DOC_LAYOUT_SCREEN">
    <bm:fields>
        <bm:field name="layout_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LAYOUT_CODE" prompt="HLS_DOC_LAYOUT_SCREEN.LAYOUT_CODE"/>
        <bm:field name="tab_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TAB_CODE" prompt="HLS_DOC_LAYOUT_SCREEN.TAB_CODE"/>
        <bm:field name="order_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ORDER_SEQ" prompt="HLS_DOC_LAYOUT_SCREEN.ORDER_SEQ"/>
        <bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME" prompt="HLS_DOC_LAYOUT_SCREEN.COLUMN_NAME"/>
        <bm:field name="input_mode" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INPUT_MODE" prompt="HLS_DOC_LAYOUT_SCREEN.INPUT_MODE"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
        		begin
        			hls030_save_pkg.screen_insert(p_layout_code => ${../../@layout_code},
                      							  p_tab_code    => ${../../@tab_code},
                      							  p_order_seq   => ${@order_seq},
						                          p_column_name => ${@column_name},
						                          p_input_mode  => ${@input_mode},
						                          p_rowspan		=> ${@rowspan},
						                          p_colspan		=> ${@colspan},
						                          p_user_id     => ${/session/@user_id});
        		end;
        	]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
        		begin
        			null;
        		end;
        	]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
        		begin
        			hls030_save_pkg.screen_delete_tab(p_layout_code => ${@layout_code},
                          							  p_tab_code    => ${@tab_code},
                          							  p_user_id     => ${/session/@user_id});
        		end;
        	]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
        		begin
        		   hls030_save_pkg.screen_check_afterSave(p_layout_code => ${@layout_code},
	                          							  p_tab_code    => ${@tab_code},
	                          							  p_user_id     => ${/session/@user_id});
        		end;
        	]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="layout_code"/>
        <bm:pk-field name="order_seq"/>
        <bm:pk-field name="tab_code"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="layout_code" queryOperator="="/>
        <bm:query-field field="tab_code" queryOperator="="/>
        <bm:query-field field="order_seq" queryOperator="="/>
        <bm:query-field field="column_name" queryOperator="="/>
    </bm:query-fields>
</bm:model>
