Created
April 10, 2019 08:31
-
-
Save samuelmale/a5ed6bf641d0fa76f36617e3ca579841 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd" > | |
<hibernate-mapping package="org.openmrs.module.idgen" > | |
<class name="IdentifierSource" table="idgen_identifier_source" abstract="true" > | |
<id name="id" type="int" column="id" unsaved-value="0"> | |
<generator class="native" /> | |
</id> | |
<discriminator column="source_type" /> | |
<property name="uuid" type="string" length="38" not-null="true" /> | |
<property name="name" type="string" not-null="true" /> | |
<property name="description" type="string" /> | |
<many-to-one name="identifierType" class="org.openmrs.PatientIdentifierType" column="identifier_type" not-null="true" /> | |
<many-to-one name="creator" class="org.openmrs.User" not-null="true" /> | |
<property name="dateCreated" type="java.util.Date" column="date_created" not-null="true" /> | |
<many-to-one name="changedBy" class="org.openmrs.User" column="changed_by" /> | |
<property name="dateChanged" type="java.util.Date" column="date_changed" /> | |
<property name="retired" type="java.lang.Boolean" length="1" not-null="true"/> | |
<many-to-one name="retiredBy" class="org.openmrs.User" column="retired_by" /> | |
<property name="dateRetired" type="java.util.Date" column="date_retired" /> | |
<property name="retireReason" type="string" column="retire_reason" /> | |
<set name="reservedIdentifiers" table="idgen_reserved_identifier" lazy="true" cascade="all-delete-orphan"> | |
<key column="source" not-null="true" /> | |
<element column="identifier" type="string"/> | |
</set> | |
<subclass name="SequentialIdentifierGenerator" discriminator-value="SEQUENTIAL"> | |
<join table="idgen_seq_id_gen"> | |
<key column="id"/> | |
<property name="nextSequenceValue" type="long" access="field" insert="false" update="false"> | |
<column name="next_sequence_value" default="-1" not-null="true"/> | |
</property> | |
<property name="baseCharacterSet" type="string" column="base_character_set" not-null="true" /> | |
<property name="firstIdentifierBase" type="string" column="first_identifier_base" not-null="true" /> | |
<property name="prefix" type="string" /> | |
<property name="suffix" type="string" /> | |
<property name="minLength" type="int" column="min_length" /> | |
<property name="maxLength" type="int" column="max_length" /> | |
<property name="isLocationPrefixedIdentifierSource" type="java.lang.Boolean" length="1" not-null="true" column="is_location_prefixed_identifier_source"/> | |
</join> | |
<subclass name="LocationPrefixedSequentialIdentifierGenerator" discriminator-value="LOCATION_PREFIXED"></subclass> | |
</subclass> | |
<subclass name="RemoteIdentifierSource" discriminator-value="REMOTE"> | |
<join table="idgen_remote_source"> | |
<key column="id"/> | |
<property name="url" type="string" not-null="true" /> | |
<property name="user" type="string" not-null="false" /> | |
<property name="password" type="string" not-null="false" /> | |
</join> | |
</subclass> | |
<subclass name="IdentifierPool" discriminator-value="POOL"> | |
<set name="identifiers" lazy="true" cascade="all-delete-orphan" inverse="true" access="field"> | |
<key column="pool_id" not-null="true" /> | |
<one-to-many class="PooledIdentifier" /> | |
</set> | |
<join table="idgen_id_pool"> | |
<key column="id"/> | |
<property name="batchSize" type="int" column="batch_size" /> | |
<property name="minPoolSize" type="int" column="min_pool_size" /> | |
<property name="refillWithScheduledTask" type="java.lang.Boolean" column="refill_with_scheduled_task" length="1" not-null="true"/> | |
<property name="sequential" type="java.lang.Boolean" length="1" not-null="true"/> | |
<many-to-one name="source" class="IdentifierSource" lazy="false" /> | |
</join> | |
</subclass> | |
</class> | |
<class name="PooledIdentifier" table="idgen_pooled_identifier"> | |
<id name="id" type="int" column="id" unsaved-value="0"><generator class="native" /></id> | |
<property name="uuid" type="string" length="38" not-null="true" /> | |
<many-to-one name="pool" class="IdentifierPool" column="pool_id" not-null="true" /> | |
<property name="identifier" type="string" not-null="true" /> | |
<property name="dateUsed" type="java.util.Date" column="date_used" /> | |
<property name="comment" type="string"/> | |
</class> | |
<class name="AutoGenerationOption" table="idgen_auto_generation_option"> | |
<id name="id" type="int" column="id" unsaved-value="0"><generator class="native" /></id> | |
<many-to-one name="identifierType" class="org.openmrs.PatientIdentifierType" column="identifier_type" not-null="true" lazy="false" /> | |
<many-to-one name="location" class="org.openmrs.Location" column="location" /> | |
<many-to-one name="source" class="IdentifierSource" column="source" not-null="true" lazy="false" /> | |
<property name="manualEntryEnabled" type="boolean" column="manual_entry_enabled" /> | |
<property name="automaticGenerationEnabled" type="boolean" column="automatic_generation_enabled" /> | |
</class> | |
<class name="LogEntry" table="idgen_log_entry"> | |
<id name="id" type="int" column="id" unsaved-value="0"><generator class="native" /></id> | |
<many-to-one name="source" class="IdentifierSource" column="source" not-null="true" lazy="false" /> | |
<property name="identifier" type="string" not-null="true" /> | |
<property name="dateGenerated" type="java.util.Date" column="date_generated" /> | |
<many-to-one name="generatedBy" class="org.openmrs.User" column="generated_by" /> | |
<property name="comment" type="string"/> | |
</class> | |
</hibernate-mapping> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment