<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-3-21 上午11:36:47  
    $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 t.parameter_id,
			       t.seq,
			       t.parameter_name,
			       t.parameter_type,
			       decode(t.parameter_type,
			              'DATE',
			              sch_task_pkg.get_para_default_date(t.default_value),
			              t.default_value) as parameter_value,
			       (case
			         when t.default_value is null then
			          'N'
			         else
			          'Y'
			       end) as lov_has_default_value,
			       (case
			         when t.edit_type = 'LOV' and t.parameter_type = 'VARCHAR2' and
			              t.default_value is not null and
			              t.default_value not like chr(36) || chr(123) || chr(47) || '%' then
			          chr(39) || t.default_value || chr(39)
			         else
			          t.default_value
			       end) as default_value_format,
			       t.task_code,
			       t.description,
			       t.edit_type,
			       t.display_flag,
			       t.display_type,
			       t.lov_sql
			  FROM SCH_TASK_PARAMETER t
			 WHERE t.task_code = ${@task_code}
			 ORDER BY t.seq
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
