Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?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 auto-import="false" default-access="field"
  package="org.ow2.bonita.facade.runtime.impl">

  <class name="ActivityFullInstanceImpl" table="NOVA_ACTIVITY_INST">
    <id column="DBID_" name="dbid">
      <generator class="native" />
    </id>
    <component name="uuid" class="org.ow2.bonita.facade.uuid.ActivityInstanceUUID">
      <property name="value" column="ACT_INST_UUID_" index="IDX_ACT_UUID"/>
    </component>
    <component name="processUUID" class="org.ow2.bonita.facade.uuid.ProcessDefinitionUUID">
      <property name="value" column="PROCESS_UUID_" />
    </component>
    <component name="packageUUID" class="org.ow2.bonita.facade.uuid.PackageDefinitionUUID">
      <property name="value" column="PACK_UUID_" />
    </component>
    <component name="instanceUUID" class="org.ow2.bonita.facade.uuid.ProcessInstanceUUID">
      <property name="value" column="INST_UUID_" index="IDX_ACT_INST_UUID"/>
    </component>

    <property name="activityId" column="ACTIVITY_ID_" />
    <property name="iterationId" column="ITERATION_ID_" />
    <property name="activityInstanceId" column="ACT_INST_ID_" />

    <many-to-one name="body"
                   column="BODY_"
                   cascade="all"
                   foreign-key="FK_ACT_BODY_"
                   index="IDX_ACT_BODY_"
                   class="ActivityBodyImpl" lazy="false"/>

    <map name="persistableVariablesBeforeReady" cascade="all-delete-orphan" table="NOVA_ACT_VARS">
      <key foreign-key="FK_ACT_VAR_BR">
        <column name="ACT_ID_" index="IDX_ACT_VAR_BR"/>
      </key>
      <map-key type="string" column="KEY_"/>
      <many-to-many class="org.ow2.bonita.pvm.internal.type.Variable" foreign-key="FK_ACT_VAR_VAL_BR">
        <column name="VAR_" index="IDX_ACT_VAR_VAL_BR"/>
      </many-to-many>
    </map>
    <list name="variableUpdates" cascade="all">
      <key foreign-key="FK_ACT_VAR_UPD">
        <column name="ACT_ID_" index="IDX_ACT_VAR_UPD"/>
      </key>
      <list-index column="INDEX_"/>
      <one-to-many class="VariableUpdateFullImpl" />
    </list>
  </class>

  <class name="ActivityBodyImpl" table="NOVA_ACT_BODY" abstract="true">
    <id column="DBID_" name="dbid">
      <generator class="native" />
    </id>
    <discriminator column="CLASS_" type="string"/>
    <property name="startedDate" column="STARTED_DATE_" type="timestamp" />
    <property name="endedDate" column="ENDED_DATE_" type="timestamp" />
    <property name="readyDate" column="READYDATE_" type="timestamp" />
    <list name="stateUpdates" cascade="all">
      <key foreign-key="FK_ACTIVITY_STATE_UPD">
        <column name="ACTIVITY_ID_" index="IDX_ACTIVITY_STATE_UPD"/>
      </key>
      <list-index column="INDEX_"/>
      <one-to-many class="StateUpdateImpl"/>
    </list>
  </class>

  <subclass name="TaskFullInstanceImpl" discriminator-value="TASK_" extends="ActivityBodyImpl" >
    <property name="startedBy" column="STARTED_BY_" />
    <property name="endedBy" column="ENDED_BY_" />
    <property name="dueDate" column="DUE_DATE_" type="timestamp" />
    <property name="createdDate" column="CREATED_DATE_" type="timestamp" />
    <!--property name="candidatesInit" column="CANDIDATES_INIT_" type="boolean" /-->

    <list name="assignUpdates" cascade="all">
      <key foreign-key="FK_TASK_ASSIGN_UPD">
        <column name="TASK_ID_" index="IDX_TASK_ASSIGN_UPD"/>
      </key>
      <list-index column="INDEX_"/>
      <one-to-many class="AssignUpdateImpl"/>
    </list>
    <component name="uuid" class="org.ow2.bonita.facade.uuid.TaskUUID">
      <property name="value" column="TASK_UUID_" index="IDX_TASK_UUID"/>
    </component>
  </subclass>

  <subclass name="AutomaticBodyImpl" discriminator-value="AUTO_BODY_" extends="ActivityBodyImpl" >
    <component name="uuid" class="org.ow2.bonita.facade.uuid.AutomaticBodyUUID">
      <property name="value" column="AUTOB_UUID_" index="IDX_AUTOB_UUID"/>
    </component>
  </subclass>
  <subclass name="RouteBodyImpl" discriminator-value="ROUTE_BODY_" extends="ActivityBodyImpl" >
    <component name="uuid" class="org.ow2.bonita.facade.uuid.RouteBodyUUID">
      <property name="value" column="ROUTE_UUID_" index="IDX_ROUTE_UUID"/>
    </component>
  </subclass>
  <subclass name="SubflowBodyImpl" discriminator-value="AUTO_SUBF_" extends="ActivityBodyImpl" >
    <component name="uuid" class="org.ow2.bonita.facade.uuid.SubflowBodyUUID">
      <property name="value" column="SUBF_UUID_" index="IDX_SUBF_UUID"/>
    </component>
  </subclass>

  <class name="ProcessFullInstanceImpl" table="NOVA_PROCESS_INST">
    <id column="DBID_" name="dbid">
      <generator class="native" />
    </id>
    <component name="processUUID" class="org.ow2.bonita.facade.uuid.ProcessDefinitionUUID">
      <property name="value" column="PROCESS_UUID_" index="IDX_INST_PROC_UUID"/>
    </component>
    <component name="packageUUID" class="org.ow2.bonita.facade.uuid.PackageDefinitionUUID">
      <property name="value" column="PACK_UUID_" />
    </component>
    <component name="instanceUUID" class="org.ow2.bonita.facade.uuid.ProcessInstanceUUID">
      <property name="value" column="INST_UUID_" index="IDX_PROC_INST_UUID" />
    </component>
    <!--  -->
    <property name="startedBy" column="STARTED_BY_" />
    <property name="startedDate" column="STARTED_DATE_" type="timestamp" />
    <property name="endedBy" column="ENDED_BY_" />
    <property name="endedDate" column="ENDED_DATE_" type="timestamp" />

    <list name="variableUpdates" cascade="all">
      <key foreign-key="FK_INST_VAR_UPD">
        <column name="INST_ID_" index="IDX_INST_VAR_UPD"/>
      </key>
      <list-index column="INDEX_"/>
      <one-to-many class="VariableUpdateFullImpl" />
    </list>
    <list name="instanceStateUpdates" cascade="all">
      <key foreign-key="FK_INST_STATE_UPD">
        <column name="INST_ID_" index="IDX_INST_STATE_UPD"/>
      </key>
      <list-index column="INDEX_"/>
      <one-to-many class="InstanceStateUpdateImpl" />
    </list>
    <component name="parentInstanceUUID" class="org.ow2.bonita.facade.uuid.ProcessInstanceUUID">
      <property name="value" column="PARENT_INST_UUID_" />
    </component>
    <set name="childrenInstanceUUID" cascade="all" table="NOVA_CHILDREN_UUID_">
      <key column="CHILDREN_UUID_" />
      <composite-element class="org.ow2.bonita.facade.uuid.ProcessInstanceUUID">
        <property name="value" column="CHILDREN_UUID"/>
      </composite-element>
    </set>
    <!-- instance state is not persisted in ProcessFullInstance (getter does not use this field)
    <property name="instanceState" column="STATE_">
      <type
        name="org.ow2.bonita.util.hibernate.GenericEnumUserType">
        <param name="enumClass">
          org.ow2.bonita.facade.runtime.InstanceState
        </param>
      </type>
    </property>
    -->
    <map name="persistableInitialVariableValues" cascade="all-delete-orphan" table="NOVA_INST_VARS">
      <key foreign-key="FK_PROC_VAR_BR">
        <column name="PROC_ID_" index="IDX_PROC_VAR_BR"/>
      </key>
      <map-key type="string" column="KEY_"/>
      <many-to-many class="org.ow2.bonita.pvm.internal.type.Variable" foreign-key="FK_PROC_VAR_VAL_BR">
        <column name="VAR_" index="IDX_PROC_VAR_VAL_BR"/>
      </many-to-many>
    </map>
    <set name="activities" cascade="all" >
      <key foreign-key="FK_INST_ACT">
        <column name="INSTANCE_DBID_" index="IDX_INST_ACT"/>
      </key>
      <one-to-many class="org.ow2.bonita.facade.runtime.impl.ActivityFullInstanceImpl"/>
    </set>
  </class>
  
  <class name="StateUpdateImpl" table="NOVA_STATE_UPDATE">
    <id column="DBID_" name="dbid">
      <generator class="native" />
    </id>
    <property name="date" column="DATE_" type="timestamp" />
    <property name="state" column="ACTIVITY_STATE_">
      <type name="org.ow2.bonita.util.hibernate.GenericEnumUserType">
        <param name="enumClass">
          org.ow2.bonita.facade.runtime.ActivityState
        </param>
      </type>
    </property>
    <property name="updateUserId" column="UPDATED_USERID_"/>
    <property name="initialState" column="INITIAL_STATE_">
      <type
        name="org.ow2.bonita.util.hibernate.GenericEnumUserType">
        <param name="enumClass">
          org.ow2.bonita.facade.runtime.ActivityState
        </param>
      </type>
    </property>
  </class>
  
  <class name="InstanceStateUpdateImpl" table="NOVA_INST_STATE_UPD">
    <id column="DBID_" name="dbid">
      <generator class="native" />
    </id>
    <property name="date" column="DATE_" type="timestamp" />
    <property name="currentState" column="INST_STATE_">
      <type name="org.ow2.bonita.util.hibernate.GenericEnumUserType">
        <param name="enumClass">
          org.ow2.bonita.facade.runtime.InstanceState
        </param>
      </type>
    </property>
    <property name="updateUserId" column="UPDATED_USERID_"/>
    <property name="initialState" column="INITIAL_STATE_">
      <type
        name="org.ow2.bonita.util.hibernate.GenericEnumUserType">
        <param name="enumClass">
          org.ow2.bonita.facade.runtime.InstanceState
        </param>
      </type>
    </property>
  </class>
  
  <class name="AssignUpdateImpl" table="NOVA_ASSIGN_UPDATE">
    <id column="DBID_" name="dbid">
      <generator class="native" />
    </id>
    <property name="date" column="DATE_" type="timestamp" />
    <property name="state" column="TASK_STATE_">
      <type name="org.ow2.bonita.util.hibernate.GenericEnumUserType">
        <param name="enumClass">
          org.ow2.bonita.facade.runtime.ActivityState
        </param>
      </type>
    </property>
    <property name="updateUserId" column="UPDATED_USERID_"/>
    <set name="candidates" cascade="all" table="NOVA_ASS_UP_CAND">
      <key foreign-key="FK_ASS_UP_CAND">
        <column name="ASSIGN_UP_ID_" index="IDX_ASS_UP_CAND"/>
      </key>
      <element type="string" column="CANDIDATE_"/>
    </set>
    <property name="userId" column="USERID_"/>
  </class>
  
  
  
  <class name="VariableUpdateFullImpl" table="NOVA_VAR_UPDATE">
    <id type="long" column="DBID_">
      <generator class="native" />
    </id>
    <property name="date" column="DATE_" type="timestamp"/>
    <property name="userId" column="USERID_"/>
    <property name="name" column="VAR_NAME_"/>
    <many-to-one name="persistableValue" 
                 class="org.ow2.bonita.pvm.internal.type.Variable" 
                 cascade="all" 
                 index="IDX_VAR_UPD_VAL" 
                 foreign-key="FK_VAR_UPD_VAL"
                 />
  </class>


</hibernate-mapping>
New to GrepCode? Check out our FAQ X