<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-3-21 上午09:13:23  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="SYS_ROLE_VL">
    <bm:fields>
        <bm:field name="role_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ROLE_ID"/>
        <bm:field name="role_code" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="100" forDisplay="true" forQuery="true" physicalName="ROLE_CODE" prompt="HLS.ROLE_CODE"/>
        <bm:field name="role_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="100" forDisplay="true" forQuery="true" physicalName="ROLE_NAME" prompt="HLS.ROLE_NAME"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="100" forDisplay="true" forQuery="true" physicalName="DESCRIPTION" prompt="HLS.ROLE_DESCRIPTION"/>
        <bm:field name="start_date" databaseType="DATE" datatype="java.util.Date" displayWidth="100" forDisplay="true" physicalName="START_DATE" prompt="HLS.START_DATE"/>
        <bm:field name="end_date" databaseType="DATE" datatype="java.util.Date" displayWidth="100" forDisplay="true" physicalName="END_DATE" prompt="HLS.END_DATE"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="role_code" queryOperator="like"/>
        <bm:query-field field="role_name" queryOperator="like"/>
        <bm:query-field field="description" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="query" expression="((sysdate between t1.start_date and nvl(t1.end_date,sysdate) and sysdate&gt;=t1.start_date) or nvl(${@display_flag},&apos;N&apos;)=&apos;Y&apos;)"/>
    </bm:data-filters>
</bm:model>
