<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="WLF_CODE_DESCRIPTION_RULE" needAccessControl="false">
    <bm:fields>
        <bm:field name="rule_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RULE_ID"/>
        <bm:field name="description_rule" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_RULE"/>
        <bm:field name="description_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_CODE"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk sequenceName="wlf_code_description_rule_s"/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="rule_id"/>
    </bm:primary-key>
    <bm:operations>
        <bm:operation name="query">
            <bm:field name="description_rule" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_RULE"/>
            <bm:field name="description_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_CODE"/>
            <bm:query-sql><![CDATA[
            	select
            	       t1.rule_id,
                       t1.description_rule,
                       t1.description_code
				  from wlf_code_description_rule t1
				  where t1.node_action_id=${@node_action_id}
				   #WHERE_CLAUSE#
				  order by t1.description_code
		    ]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="insert">
            <bm:field name="description_rule" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_RULE"/>
            <bm:field name="description_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_CODE"/>
            <bm:update-sql><![CDATA[
            begin
                insert into wlf_code_description_rule
                (rule_id,description_rule,description_code,node_action_id)
                values
                (wlf_code_description_rule_s.nextval,${@description_rule},${@description_code},${@node_action_id});
            end;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
