<?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">
<hibernate-mapping>
<class name="com.gosophia.taskManagement.entity.Job" table="T_TASKMANAGEMENT_JOB" lazy="false">
<id name="jobId" type="long">
<column name="JOBID" precision="22" scale="0" />
<generator class="sequence"></generator>
</id>
<discriminator column="TYPEFLG" type="string" />
<version name="version" column="version" type="long"></version>
<property name="handlerURL" type="java.lang.String">
<column name="HANDLERURL" length="256" />
</property>
<property name="detailURL" type="java.lang.String">
<column name="DETAILURL" length="256" />
</property>
<property name="startDate" type="java.util.Date">
<column name="STARTDATE"></column>
</property>
<property name="scheduleEndDate" type="java.util.Date">
<column name="SCHEDLEENDDATE"></column>
</property>
<property name="actualEndTime" type="java.util.Date">
<column name="ACTUALENDTIME" length="32"></column>
</property>
<property name="jobType" type="java.lang.String">
<column name="JOBTYPE" length="64"></column>
</property>
<property name="jobState" type="java.lang.String">
<column name="JOBSTATE" length="64"></column>
</property>
<!-- 令牌 -->
<property name="tokenName" type="java.lang.String">
<column name="TOKENNAME" length="256" />
</property>
<many-to-one name="mission"
class="com.gosophia.taskManagement.entity.Mission" unique="true">
<column name="MISSIONID"></column>
</many-to-one>
<!-- 问题 -->
<many-to-one name="nextJob" class="com.gosophia.taskManagement.entity.Job" unique="true">
<column name="NEXTJOBID"></column>
</many-to-one>
<many-to-one name="previousJob" class="com.gosophia.taskManagement.entity.Job" unique="true">
<column name="PREVIOUSJOBID"></column>
</many-to-one>
<!-- 任务执行人 -->
<many-to-one name="operator"
class="com.gosophia.userManagement.entity.UserInfo" unique="true">
<column name="OPERATOR"></column>
</many-to-one>
<!-- 任务承办人 -->
<many-to-one name="undertaker"
class="com.gosophia.userManagement.entity.UserInfo" unique="true">
<column name="UNDERTAKER"></column>
</many-to-one>
<!-- 来自 -->
<many-to-one name="source"
class="com.gosophia.userManagement.entity.UserInfo" unique="true">
<column name="SOURCE"></column>
</many-to-one>
<subclass name="com.gosophia.taskManagement.entity.JobBranch"
discriminator-value="jobBranch">
<bag name="subBranches" lazy="true" table="T_TASKMANAGEMENT_JOB">
<key>
<column name="JOBPARENTID" precision="22" scale="0" />
</key>
<one-to-many class="com.gosophia.taskManagement.entity.Job"/>
</bag>
</subclass>
</class>
</hibernate-mapping>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.gosophia.taskManagement.entity.Job" table="T_TASKMANAGEMENT_JOB" lazy="false">
<id name="jobId" type="long">
<column name="JOBID" precision="22" scale="0" />
<generator class="sequence"></generator>
</id>
<discriminator column="TYPEFLG" type="string" />
<version name="version" column="version" type="long"></version>
<property name="handlerURL" type="java.lang.String">
<column name="HANDLERURL" length="256" />
</property>
<property name="detailURL" type="java.lang.String">
<column name="DETAILURL" length="256" />
</property>
<property name="startDate" type="java.util.Date">
<column name="STARTDATE"></column>
</property>
<property name="scheduleEndDate" type="java.util.Date">
<column name="SCHEDLEENDDATE"></column>
</property>
<property name="actualEndTime" type="java.util.Date">
<column name="ACTUALENDTIME" length="32"></column>
</property>
<property name="jobType" type="java.lang.String">
<column name="JOBTYPE" length="64"></column>
</property>
<property name="jobState" type="java.lang.String">
<column name="JOBSTATE" length="64"></column>
</property>
<!-- 令牌 -->
<property name="tokenName" type="java.lang.String">
<column name="TOKENNAME" length="256" />
</property>
<many-to-one name="mission"
class="com.gosophia.taskManagement.entity.Mission" unique="true">
<column name="MISSIONID"></column>
</many-to-one>
<!-- 问题 -->
<many-to-one name="nextJob" class="com.gosophia.taskManagement.entity.Job" unique="true">
<column name="NEXTJOBID"></column>
</many-to-one>
<many-to-one name="previousJob" class="com.gosophia.taskManagement.entity.Job" unique="true">
<column name="PREVIOUSJOBID"></column>
</many-to-one>
<!-- 任务执行人 -->
<many-to-one name="operator"
class="com.gosophia.userManagement.entity.UserInfo" unique="true">
<column name="OPERATOR"></column>
</many-to-one>
<!-- 任务承办人 -->
<many-to-one name="undertaker"
class="com.gosophia.userManagement.entity.UserInfo" unique="true">
<column name="UNDERTAKER"></column>
</many-to-one>
<!-- 来自 -->
<many-to-one name="source"
class="com.gosophia.userManagement.entity.UserInfo" unique="true">
<column name="SOURCE"></column>
</many-to-one>
<subclass name="com.gosophia.taskManagement.entity.JobBranch"
discriminator-value="jobBranch">
<bag name="subBranches" lazy="true" table="T_TASKMANAGEMENT_JOB">
<key>
<column name="JOBPARENTID" precision="22" scale="0" />
</key>
<one-to-many class="com.gosophia.taskManagement.entity.Job"/>
</bag>
</subclass>
</class>
</hibernate-mapping>