<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhenwei.yin  
    $Date: 2013-4-16 下午3:49:53  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_DOCUMENT_TYPE" defaultOrderBy="t1.document_category,t1.document_type">
    <bm:fields>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE" prompt="HLS.DOCUMENT_TYPE"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS.DESCRIPTION"/>
        <bm:field name="document_category_desc" forInsert="false" forUpdate="false" prompt="HLS.DOCUMENT_CATEGORY_DESC"/>
        <bm:field name="document_category" databaseType="VARCHAR" datatype="java.lang.String" lookupCode="CODING_RULE_DOC_CATEGORY" lookupField="document_category_desc" prompt="HLS.DOCUMENT_CATEGORY"/>
        <bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="HLS.BUSINESS_TYPE"/>
        <bm:field name="business_type_desc" forInsert="false" forUpdate="false" prompt="HLS.BUSINESS_TYPE_DESC"/>
        <bm:field name="status_profile" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS_PROFILE" prompt="HLS.STATUS_PROFILE"/>
        <bm:field name="coding_rule" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CODING_RULE"/>
        <bm:field name="coding_rule_desc" forInsert="false" forUpdate="false" prompt="HLS.CODING_RULE_DESC"/>
        <bm:field name="ref_document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_DOCUMENT_TYPE"/>
        <bm:field name="ref_document_type_desc" forInsert="false" forUpdate="false" prompt="HLS.REF_DOCUMENT_TYPE"/>
        <bm:field name="printing_format" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRINTING_FORMAT" prompt="HLS.PRINTING_FORMAT"/>
        <bm:field name="printing_format_desc" forInsert="false" forUpdate="false" prompt="HLS.PRINTING_FORMAT"/>
        <bm:field name="approval_method" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVAL_METHOD"/>
        <bm:field name="approval_method_desc" forInsert="false" forUpdate="false" prompt="HLS.APPROVAL_METHOD"/>
        <bm:field name="ln_starting" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LN_STARTING" prompt="HLS.LN_STARTING"/>
        <bm:field name="ln_step_length" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LN_STEP_LENGTH" prompt="HLS.LN_STEP_LENGTH"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS.ENABLED_FLAG"/>
        <bm:field name="workflow_id" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WORKFLOW_ID"/>
        <bm:field name="workflow_desc" forInsert="false" forUpdate="false" prompt="HLS.WORKFLOW_DESC"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="HLS_DOCUMENT_TYPE.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="HLS_DOCUMENT_TYPE.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="HLS_DOCUMENT_TYPE.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="HLS_DOCUMENT_TYPE.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="HLS_DOCUMENT_TYPE.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="HLS_DOCUMENT_TYPE.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="HLS_DOCUMENT_TYPE.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="HLS_DOCUMENT_TYPE.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="HLS_DOCUMENT_TYPE.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="HLS_DOCUMENT_TYPE.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="HLS_DOCUMENT_TYPE.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="HLS_DOCUMENT_TYPE.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="HLS_DOCUMENT_TYPE.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="HLS_DOCUMENT_TYPE.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="HLS_DOCUMENT_TYPE.REF_D05"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select t1.document_type,
				       t1.document_type_desc as description,
				       t1.document_category,
				       t1.document_category_desc,
				       t1.business_type,
				       t1.business_type_desc,
				       t1.status_profile,
				       t1.coding_rule,
				       t1.coding_rule_desc,
				       t1.printing_format,
				       t1.printing_format_desc,
				       t1.approval_method,
				       t1.approval_method_desc,
				       t1.ln_starting,
				       t1.ln_step_length,
				       t1.ref_document_type,
				       t1.ref_document_type_desc,
				       t1.enabled_flag,
				       t1.workflow_id,
				       t1.workflow_desc,
				       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
				  from hls_document_type_v t1
				  #WHERE_CLAUSE#
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="document_type" queryOperator="like"/>
        <bm:query-field field="document_category" queryOperator="="/>
    </bm:query-fields>
    <bm:primary-key>
        <bm:pk-field name="document_type"/>
    </bm:primary-key>
</bm:model>
