<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hand  
    $Date: 2016-7-6 下午4:22:10  
    $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="CON_COLLECTION_HOLD" defaultOrderBy="data_class desc" needAccessControl="false">
    <bm:fields>
        <bm:field name="hold_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HOLD_ID" prompt="CON_COLLECTION_HOLD.HOLD_ID"/>
        <bm:field name="collection_hold" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COLLECTION_HOLD" prompt="CON_COLLECTION_HOLD.COLLECTION_HOLD"/>
        <bm:field name="change_date" databaseType="DATE" datatype="java.util.Date" physicalName="CHANGE_DATE" prompt="CON_COLLECTION_HOLD.CHANGE_DATE"/>
        <bm:field name="data_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DATA_CLASS" prompt="CON_COLLECTION_HOLD.DATA_CLASS"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="hold_id"/>
    </bm:primary-key>
    <!-- <bm:data-filters>
        <bm:data-filter name="hold_id" expression="t1.hold_id=${@hold_id}"/>
    </bm:data-filters> -->
    <!--  <bm:operations >
    <bm:operation name="query"><![CDATA[
    SELECT
    t1.HOLD_ID,
    t1.COLLECTION_HOLD,
    t1.CHANGE_DATE,
    t1.DATA_CLASS
FROM
    CON_COLLECTION_HOLD t1
    WHERE t1.data_class='normal';
    ]]></bm:operation>
    </bm:operations> -->
    <!--  <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
        DECLARE
        BEGIN
            INSERT
            INTO
                con_collection_hold
                (
                   hold_id,
                   collection_hold,
                   change_date,
                   data_class,
                    CREATED_BY,
                    CREATION_DATE,
                    LAST_UPDATED_BY,
                    LAST_UPDATE_DATE
                )
                VALUES
                (
                    CON_COLLECTION_HOLD_S.NEXTVAL,
                    ${@collection_hold},
                    sysdate,
                    ${/parameter/@data_class},
                    ${/session/@user_id},
                    sysdate,
                    ${/session/@user_id},
                    sysdate
                );
        END;
        
       ]]></bm:update-sql>
        </bm:operation>
    </bm:operations> -->
</bm:model>
