<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: likun  
    $Date: 2012-6-21 上午10:51:42  
    $Revision: 1.0  
    $Purpose:  
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="FND_REQUEST_PROGRAM">
    <bm:fields>
        <bm:field name="program_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROGRAM_ID" prompt="FND_REQUEST_PROGRAM.PROGRAM_ID"/>
        <bm:field name="request_info_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REQUEST_INFO_ID" prompt="FND_REQUEST_PROGRAM.REQUEST_INFO_ID"/>
        <bm:field name="request_code" expression="(select i.request_code from fnd_request_info i where i.request_info_id=t1.request_info_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="request_name" expression="(select i.request_name from fnd_request_info i where i.request_info_id=t1.request_info_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="program_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROGRAM_CODE" prompt="FND_REQUEST_PROGRAM.PROGRAM_CODE"/>
        <bm:field name="program_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROGRAM_NAME" prompt="FND_REQUEST_PROGRAM.PROGRAM_NAME"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="FND_REQUEST_PROGRAM.DESCRIPTION"/>
        <bm:field name="what" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WHAT" prompt="FND_REQUEST_PROGRAM.WHAT"/>
        <bm:field name="enable_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLE_FLAG" prompt="FND_REQUEST_PROGRAM.ENABLE_FLAG"/>
        <bm:field name="enable_desc" expression="(decode(enable_flag,&apos;N&apos;,&apos;失效&apos;,&apos;Y&apos;,&apos;有效&apos;))" forInsert="false" forUpdate="false"/>
        <bm:field name="cycle_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CYCLE_FLAG" prompt="FND_REQUEST_PROGRAM.CYCLE_FLAG"/>
        <bm:field name="cycle_flag_desc" expression="(decode(cycle_flag,&apos;N&apos;,&apos;否&apos;,&apos;Y&apos;,&apos;是&apos;))" forInsert="false" forUpdate="false"/>
        <bm:field name="fixed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIXED_FLAG"/>
        <bm:field name="url" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="start_date" databaseType="TIMESTAMP" datatype="java.sql.Timestamp"/>
        <bm:field name="end_date" databaseType="TIMESTAMP" datatype="java.sql.Timestamp"/>
        <bm:field name="interval_hour" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="interval_minute" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="interval_second" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="freq" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="interval" databaseType="NUMBER" datatype="java.lang.Long"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="program_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="program_id" queryExpression="program_id = ${@program_id}"/>
        <bm:query-field name="enable_flag" queryExpression="enable_flag = ${@enable_flag}"/>
        <bm:query-field name="cycle_flag" queryExpression="cycle_flag = ${@cycle_flag}"/>
        <bm:query-field name="program_code" queryExpression="upper(program_code) like  upper(&apos;%&apos;||${@program_code}||&apos;%&apos;)"/>
        <bm:query-field name="program_name" queryExpression="upper(program_name) like  upper(&apos;%&apos;||${@program_name}||&apos;%&apos;)"/>
        <bm:query-field name="description" queryExpression="upper(description) like  upper(&apos;%&apos;||${@description}||&apos;%&apos;)"/>
        <bm:query-field name="request_code" queryExpression="upper(request_code) like  upper(&apos;%&apos;||${@request_code}||&apos;%&apos;)"/>
        <bm:query-field name="request_name" queryExpression="upper(request_name) like  upper(&apos;%&apos;||${@request_name}||&apos;%&apos;)"/>
    </bm:query-fields>
</bm:model>
