<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="com.gosophia.organizationManagement.entity.Organization" table="T_ORGMANAGE_ORGANIZATION">
<id name="orgId" type="long">
<column name="ORGID" precision="22" scale="0" />
<generator class="sequence"></generator>
</id>
<version name="version" column="version" type="long"></version>
<property name="orgCode" type="string">
<column name="ORGCODE" length="32"/>
</property>
<property name="orgName" type="string">
<column name="ORGNAME" length="64" not-null="true" />
</property>
<property name="orgAddress" type="string">
<column name="ORGADDRESS" length="128" />
</property>
<property name="orgPostCode" type="string">
<column name="ORGPOSTCODE" length="8" />
</property>
<property name="orgShortName" type="string">
<column name="ORGSHORTNAME" length="64" />
</property>
<property name="orgMail" type="string">
<column name="ORGMAIL" length="64" />
</property>
<property name="orgNote" type="string">
<column name="ORGNOTE" length="128" />
</property>
<property name="orgnOrderIndex" type="java.lang.Integer">
<column name="ORGNORDERINDEX"/>
</property>
<property name="orgPhoneNum" type="string">
<column name="ORGPHONENUM"/>
</property>
<property name="orgFaxNum" type="string">
<column name="ORGFAXNUM"/>
</property>
<bag name="childOrgList" cascade="delete" lazy="false" fetch="subselect" table="T_ORGMANAGE_ORGANIZATION" inverse="true"
order-by="orgnOrderIndex desc">
<key>
<column name="PARENTID" precision="22" scale="0" />
</key>
<one-to-many class="com.gosophia.organizationManagement.entity.Organization" />
</bag>
<bag name="positionList" table="T_ORGMANAGE_POSITION" cascade="delete" lazy="true" inverse="true">
<key>
<column name="ORGID" precision="22" scale="0" not-null="true" />
</key>
<one-to-many class="com.gosophia.organizationManagement.entity.Position" />
</bag>
<many-to-one name="parentOrg" column="PARENTID" lazy="false"></many-to-one>
</class>
</hibernate-mapping>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="com.gosophia.organizationManagement.entity.Organization" table="T_ORGMANAGE_ORGANIZATION">
<id name="orgId" type="long">
<column name="ORGID" precision="22" scale="0" />
<generator class="sequence"></generator>
</id>
<version name="version" column="version" type="long"></version>
<property name="orgCode" type="string">
<column name="ORGCODE" length="32"/>
</property>
<property name="orgName" type="string">
<column name="ORGNAME" length="64" not-null="true" />
</property>
<property name="orgAddress" type="string">
<column name="ORGADDRESS" length="128" />
</property>
<property name="orgPostCode" type="string">
<column name="ORGPOSTCODE" length="8" />
</property>
<property name="orgShortName" type="string">
<column name="ORGSHORTNAME" length="64" />
</property>
<property name="orgMail" type="string">
<column name="ORGMAIL" length="64" />
</property>
<property name="orgNote" type="string">
<column name="ORGNOTE" length="128" />
</property>
<property name="orgnOrderIndex" type="java.lang.Integer">
<column name="ORGNORDERINDEX"/>
</property>
<property name="orgPhoneNum" type="string">
<column name="ORGPHONENUM"/>
</property>
<property name="orgFaxNum" type="string">
<column name="ORGFAXNUM"/>
</property>
<bag name="childOrgList" cascade="delete" lazy="false" fetch="subselect" table="T_ORGMANAGE_ORGANIZATION" inverse="true"
order-by="orgnOrderIndex desc">
<key>
<column name="PARENTID" precision="22" scale="0" />
</key>
<one-to-many class="com.gosophia.organizationManagement.entity.Organization" />
</bag>
<bag name="positionList" table="T_ORGMANAGE_POSITION" cascade="delete" lazy="true" inverse="true">
<key>
<column name="ORGID" precision="22" scale="0" not-null="true" />
</key>
<one-to-many class="com.gosophia.organizationManagement.entity.Position" />
</bag>
<many-to-one name="parentOrg" column="PARENTID" lazy="false"></many-to-one>
</class>
</hibernate-mapping>