<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-9-17 下午1:49:11  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="FND_SC_SCALEPLATE_DTL">
    <bm:fields>
        <bm:field name="sc_scaleplate_dtl_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SC_SCALEPLATE_DTL_ID"/>
        <bm:field name="sc_scaleplate_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SC_SCALEPLATE_ID"/>
        <bm:field name="sc_scaleplate_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SC_SCALEPLATE_CODE" prompt="等级"/>
        <bm:field name="line_number" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LINE_NUMBER" prompt="HLS.LINE_NUMBER"/>
        <bm:field name="left_bracket" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEFT_BRACKET" prompt="FND712.FND_SCORE_TARGET_VALUES.LEFT_BRACKET"/>
        <bm:field name="from_value" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FROM_VALUE" prompt="FND712.FND_SCORE_TARGET_VALUES.FROM_VALUE"/>
        <bm:field name="quotation_mark" forInsert="false" forUpdate="false"/>
        <bm:field name="to_value" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TO_VALUE" prompt="FND712.FND_SCORE_TARGET_VALUES.TO_VALUE"/>
        <bm:field name="right_bracket" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RIGHT_BRACKET" prompt="FND712.FND_SCORE_TARGET_VALUES.RIGHT_BRACKET"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS.DESCRIPTION"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="FND_SC_SCALEPLATE_DTL.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="FND_SC_SCALEPLATE_DTL.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="FND_SC_SCALEPLATE_DTL.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="FND_SC_SCALEPLATE_DTL.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="FND_SC_SCALEPLATE_DTL.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="FND_SC_SCALEPLATE_DTL.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="FND_SC_SCALEPLATE_DTL.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="FND_SC_SCALEPLATE_DTL.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="FND_SC_SCALEPLATE_DTL.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="FND_SC_SCALEPLATE_DTL.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="FND_SC_SCALEPLATE_DTL.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="FND_SC_SCALEPLATE_DTL.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="FND_SC_SCALEPLATE_DTL.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="FND_SC_SCALEPLATE_DTL.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="FND_SC_SCALEPLATE_DTL.REF_D05"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
			select t1.sc_scaleplate_dtl_id,
			       t1.sc_scaleplate_id,
			       t1.sc_scaleplate_code,
			       t1.line_number,
			       t1.left_bracket,
			       t1.from_value,
			       ',' as quotation_mark,
			       t1.to_value,
			       t1.right_bracket,
			       t1.description,
			       t1.ref_v01,
			       t1.ref_v02,
			       t1.ref_v03,
			       t1.ref_v04,
			       t1.ref_v05,
			       t1.ref_n01,
			       t1.ref_n02,
			       t1.ref_n03,
			       t1.ref_n04,
			       t1.ref_n05,
			       t1.ref_d01,
			       t1.ref_d02,
			       t1.ref_d03,
			       t1.ref_d04,
			       t1.ref_d05,
			       t1.creation_date,
			       t1.created_by,
			       t1.last_update_date,
			       t1.last_updated_by
			  from fnd_sc_scaleplate_dtl t1
			  #WHERE_CLAUSE#
			  order by t1.line_number
    		]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
    			begin
    			   NULL;
    			end;
    		]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="sc_scaleplate_dtl_id"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter name="sc_scaleplate_id" enforceOperations="query" expression="t1.sc_scaleplate_id = ${@sc_scaleplate_id}"/>
    </bm:data-filters>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="FND712.ERROR_MESSAGE.LINE_NUMBER_REPEATED"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
