<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wushuang  
    $Date: 2011-11-24 下午1:55:05  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    *
                FROM
                    (SELECT
                        job_name,
                        TO_CHAR(log_date, 'yyyy-mm-dd hh24:mi:ssxff') AS log_date,
                        TO_CHAR(req_start_date, 'yyyy-mm-dd hh24:mi:ssxff') AS req_start_date,
                        TO_CHAR(actual_start_date, 'yyyy-mm-dd hh24:mi:ssxff') AS actual_start_date,
                        DECODE(status, 'FAILED', '失败', 'SUCCEEDED', '成功') AS status,
                        additional_info
                    FROM
                        user_scheduler_job_run_details
                    WHERE
                        owner    = USER
                    ORDER BY
                        log_id desc
                    ) #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="job_name" queryExpression="job_name = ${@job_name}"/>
    </bm:query-fields>
</bm:model>
