<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: likun  
    $Date: 2011-8-18 下午03:25:19 
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select * from (
            select role_id, role_code, description, role_name
			  from sys_role_vl
			 where start_date < sysdate
			   and (end_date > sysdate-1 or end_date is null))
      #WHERE_CLAUSE#
	  ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="role_id" databaseType="NUMBER" datatype="java.lang.Long" forDisplay="false"/>
        <bm:field name="role_code" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="60" forDisplay="true" forQuery="true" prompt="编码"/>
        <bm:field name="role_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="80" forDisplay="true" forQuery="true" prompt="名称"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="120" forDisplay="true" prompt="描述"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="role_code" queryExpression="upper(role_code) like  upper(&apos;%&apos;||${@role_code}||&apos;%&apos;)"/>
        <bm:query-field name="role_name" queryExpression="upper(role_name) like  upper(&apos;%&apos;||${@role_name}||&apos;%&apos;)"/>
    </bm:query-fields>
</bm:model>