<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hand  
    $Date: 2016-7-2 上午11:28:32  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CON_COLLECTION_METHODS" needAccessControl="false">
    <bm:fields>
        <bm:field name="methods_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="METHODS_ID" prompt="CON_COLLECTION_METHODS.METHODS_ID"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="CON_COLLECTION_METHODS.DESCRIPTION"/>
        <bm:field name="methods_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="METHODS_NAME" prompt="CON_COLLECTION_METHODS.METHODS_NAME"/>
        <bm:field name="enable_flag"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="methods_id"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.enable_flag = &apos;Y&apos;"/>
    </bm:data-filters>
    <!-- <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                   t1.methods_id,
                   t1.description,
                   t1.enabled_flag, 
                    DECODE(
                    (SELECT
                        COUNT(*) FROM con_collection_way ccw WHERE ccw.methods_id=t1.methods_id AND
                        ccw.type_id                                              = ${/parameter/@type_id}
                    ), 0, 'N', 'Y') checked
                FROM
                    CON_COLLECTION_METHODS t1
                WHERE
                    t1.enabled_flag = 'Y'
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations> -->
</bm:model>
