<?xml version="1.0" encoding="UTF-8" ?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
	version="1.0">
	<description>CCHT</description>
	<persistence-unit-metadata>
		<xml-mapping-metadata-complete />
	</persistence-unit-metadata>

	<!--  Abstract Entity class mappings  -->
	<mapped-superclass class="gov.va.med.fw.model.AbstractKeyedEntity"
		access="FIELD">
		<attributes>
			<id name="id">
				<column name="ID" nullable="false" updatable="false" />
				<generated-value strategy="IDENTITY" />
			</id>
			<!--  transient name="identifier"/-->
		</attributes>
	</mapped-superclass>

	<mapped-superclass class="gov.va.med.ccht.model.AbstractHTEntity"
		access="FIELD">
		<attributes>
			<id name="id">
				<column name="ID" />
				<generated-value strategy="IDENTITY" />
			</id>
		</attributes>
	</mapped-superclass>

	<mapped-superclass class="gov.va.med.fw.model.AbstractVersionedEntity"
		access="FIELD">
		<attributes>
			<basic name="createdOn">
				<column name="RECORD_CREATED_DATE" updatable="false" />
			</basic>
			<basic name="modifiedOn">
				<column name="RECORD_MODIFIED_DATE" />
			</basic>
			<!--
				<basic name="createdInTimeZone"> <column
				name="RECORD_CREATED_DATE_TZ" updatable="false"/></basic> <basic
				name="modifiedInTimeZone"> <column
				name="RECORD_MODIFIED_DATE_TZ"/></basic>
			-->
			<version name="version">
				<column name="RECORD_MODIFIED_COUNT" />
			</version>
			<embedded name="createdBy">
			</embedded>
			<embedded name="modifiedBy">
				<attribute-override name="changeUser">
					<column name="RECORD_MODIFIED_BY" />
				</attribute-override>
			</embedded>

			<transient name="createdInTimeZone" />
			<transient name="modifiedInTimeZone" />
			<transient name="transactionType" />
			<transient name="previousVersion" />
			<transient name="historyId" />
		</attributes>
	</mapped-superclass>

	<mapped-superclass class="gov.va.med.fw.model.lookup.AbstractLookup"
		access="FIELD">
		<attributes>
			<id name="identifier">
				<column name="ID" />
				<generated-value strategy="IDENTITY" />
			</id>
			<basic name="code">
				<column name="CODE" />
			</basic>
			<basic name="description">
				<column name="DESCRIPTION" />
			</basic>
			<basic name="name">
				<column name="NAME" />
			</basic>
			<transient name="startDate" />
			<transient name="endDate" />
		</attributes>
	</mapped-superclass>

	<mapped-superclass class="gov.va.med.fw.model.lookup.AbstractVersionedLookup"
		access="FIELD">
		<attributes>
			<basic name="active">
				<column name="ISACTIVE" />
			</basic>
			<basic name="sortOrder">
				<column name="SORT_ORDER" />
			</basic>
			<basic name="createdOn">
				<column name="RECORD_CREATED_DATE" updatable="false" />
			</basic>
			<basic name="modifiedOn">
				<column name="RECORD_MODIFIED_DATE" />
			</basic>

			<embedded name="createdBy"></embedded>
			<embedded name="modifiedBy">
				<attribute-override name="changeUser">
					<column name="RECORD_MODIFIED_BY" />
				</attribute-override>
			</embedded>
		</attributes>
	</mapped-superclass>

	<mapped-superclass class="gov.va.med.fw.model.lookup.AbstractActiveLookup"
		access="FIELD">
		<attributes>
			<basic name="active">
				<column name="ISACTIVE" />
			</basic>
		</attributes>
	</mapped-superclass>

	<mapped-superclass
		class="gov.va.med.fw.model.lookup.AbstractActiveSortedLookup" access="FIELD">
		<attributes>
			<basic name="active">
				<column name="ISACTIVE" />
			</basic>
			<basic name="sortOrder">
				<column name="SORT_ORDER" />
			</basic>
		</attributes>
	</mapped-superclass>

	<mapped-superclass
		class="gov.va.med.fw.model.lookup.AbstractNamedActiveSortedLookup"
		access="FIELD">
		<attributes>
			<basic name="active">
				<column name="ISACTIVE" />
			</basic>
			<basic name="sortOrder">
				<column name="SORT_ORDER" />
			</basic>
		</attributes>
	</mapped-superclass>
	
	<embeddable class="gov.va.med.fw.model.AuditInfo">
		<attributes>
			<basic name="changeUser">
				<column name="RECORD_CREATED_BY" updatable="false" />
			</basic>
			<transient name="entityKey" />
			<transient name="changeDate" />
			<transient name="status" />
		</attributes>
	</embeddable>

</entity-mappings>
 

