<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping default-lazy="false" default-cascade="all">
    <class name="gov.va.med.cds.audit.persistence.CdsAuditClobStore" table="AUDIT_CLOB_STR" lazy="false">
        <id type="java.lang.Long">
            <column name="AUDIT_CLOB_STR_ID"/>
            <generator class="sequence" >
				<param name="sequence">AUDIT_CLOB_STR_SEQ_ID</param>
			</generator>
        </id>
        
        <property name="facilityId" column="FACILITY_ID"/>
        <property name="requestId" column="REQUEST_ID"/>
        <property name="hl7Clob" column="HL7_CLOB"/>
        <property name="messageDateTime" column="MESSAGE_DATE_TIME"/>
        <property name="messageType" column="MESSAGE_TYP"/>
	    <property name="clientIdentifier" column="CLIENT_IDENTIFIER"/>  
	    <property name="clientRequestInitiationTime" column="CLIENT_REQUEST_TM"/>
        
        <many-to-one name="templateIdWrapper" class="gov.va.med.cds.audit.TemplateIdWrapper" 
            column="TEMPLATE_NAME_ID" unique="true"/>
	</class>

</hibernate-mapping>
