<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select t1.* from (
                SELECT
                    t.bp_id,
                    t.bp_code,
                    t.bp_name
                FROM
                    hls_bp_master t
                WHERE
                    t.enabled_flag = 'Y' AND
                    EXISTS
                    (SELECT
                        1
                    FROM
                        hls_bp_master_role d
                    WHERE
                        d.bp_id        = t.bp_id AND
                        d.bp_category IN ('PLEDGER') AND
                        d.enabled_flag = 'Y'
                    )) t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="bp_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="商业伙伴代码"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="商业伙伴名称"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="bp_code" queryOperator="like"/>
        <bm:query-field field="bp_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
