Activiti 5.17 实体对象与类和数据库表的映射

一、Activiti 5.17 mybatis的mapping文件声明映射的实体对象关系。

  
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">

<configuration>
  <settings>
    <setting name="lazyLoadingEnabled" value="false" />
  </settings>
  <typeAliases>
    <typeAlias type="org.activiti.engine.impl.persistence.ByteArrayRefTypeHandler" alias="ByteArrayRefTypeHandler"/>
  </typeAliases>
  <typeHandlers>
    <typeHandler handler="ByteArrayRefTypeHandler" 
                 javaType="org.activiti.engine.impl.persistence.entity.ByteArrayRef"
                 jdbcType="VARCHAR"/>
  </typeHandlers>
  <mappers>
    <mapper resource="org/activiti/db/mapping/entity/Attachment.xml" />
    <mapper resource="org/activiti/db/mapping/entity/ByteArray.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Comment.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Deployment.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Execution.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Group.xml" />
    <mapper resource="org/activiti/db/mapping/entity/HistoricActivityInstance.xml" />
    <mapper resource="org/activiti/db/mapping/entity/HistoricDetail.xml" />
    <mapper resource="org/activiti/db/mapping/entity/HistoricProcessInstance.xml" />
    <mapper resource="org/activiti/db/mapping/entity/HistoricVariableInstance.xml" />
    <mapper resource="org/activiti/db/mapping/entity/HistoricTaskInstance.xml" />
    <mapper resource="org/activiti/db/mapping/entity/HistoricIdentityLink.xml" />
    <mapper resource="org/activiti/db/mapping/entity/IdentityInfo.xml" />
    <mapper resource="org/activiti/db/mapping/entity/IdentityLink.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Job.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Membership.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Model.xml" />
    <mapper resource="org/activiti/db/mapping/entity/ProcessDefinition.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Property.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Resource.xml" />
    <mapper resource="org/activiti/db/mapping/entity/TableData.xml" />
    <mapper resource="org/activiti/db/mapping/entity/Task.xml" />
    <mapper resource="org/activiti/db/mapping/entity/User.xml" />
    <mapper resource="org/activiti/db/mapping/entity/VariableInstance.xml" />
    <mapper resource="org/activiti/db/mapping/entity/EventSubscription.xml" />
  </mappers>
</configuration>
    


二、描述文件、实体类和数据库对应的关系

序号

映射文件名称

含义

实体类名

数据库表名

1

Attachment.xml

附件

AttachmentEntity

ACT_HI_ATTACHMENT

2

ByteArray.xml

比特数组

ByteArrayEntity 

ACT_GE_BYTEARRAY 

3

Comment.xml

备注

CommentEntity

ACT_HI_COMMENT

4

Deployment.xml


DeploymentEntity

ACT_RE_DEPLOYMENT

5

Execution.xml


ExecutionEntity

ACT_RU_EXECUTION

6

Group.xml


GroupEntity

ACT_ID_GROUP

7

HistoricActivityInstance.xml


HistoricActivityInstanceEntity

ACT_HI_ACTINST

8

HistoricDetail.xml


HistoricDetailEntity

ACT_HI_DETAIL

9

HistoricProcessInstance.xml


HistoricProcessInstanceEntity

ACT_HI_PROCINST

10

HistoricVariableInstance.xml


HistoricVariableInstanceEntity

ACT_HI_VARINST

11

HistoricTaskInstance.xml


HistoricTaskInstanceEntity

ACT_HI_TASKINST

12

HistoricIdentityLink.xml


HistoricIdentityLinkEntity

ACT_HI_IDENTITYLINK

13

IdentityInfo.xml


IdentityInfoEntity

ACT_ID_INFO

14

IdentityLink.xml


IdentityLinkEntity

ACT_RU_IDENTITYLINK

15

Job.xml


JobEntity

ACT_RU_JOB

16

Membership.xml


MembershipRelation

ACT_ID_MEMBERSHIP

17

Model.xml


ModelEntity

ACT_RE_MODEL

18

ProcessDefinition.xml


ProcessDefinitionEntity

ACT_RE_PROCDEF

19

Property.xml


PropertyEntity

ACT_GE_PROPERTY

20

Resource.xml


ResourceEntity

ACT_GE_BYTEARRAY

21

TableData.xml


任意表

22

Task.xml


TaskEntity

ACT_RU_TASK

23

User.xml


UserEntity

ACT_ID_USER

24

VariableInstance.xml


VariableInstanceEntity

ACT_RU_VARIABLE

25

EventSubscription.xml


EventSubscriptionEntity

ACT_RU_EVENT_SUBSCR



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值