Activiti实体对象与类和数据库表的映射
2016-11-03 17:17
274 查看
<?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>
二、描述文件、实体类和数据库对应的关系
<!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 |
相关文章推荐
- Activiti 5.17 实体对象、类、数据库表的映射
- Activiti 5.17 实体对象与类和数据库表的映射
- Activiti 5.17 实体对象与类和数据库表的映射
- iOS:LKDBHelper实体对象映射数据库-第三方框架(在FMDB的基础上进行二次封装)
- Mybatis学习笔记:(二) java中的实体(对象、List、Set)关系怎样与数据库关联映射
- 数据库的设计及hibernate实体映射
- c#利用反射+特性实现简单的实体映射数据库操作类(表与类的映射)
- 对象/关系数据库映射基础
- 实体bean的关系/对象映射 | Mapping entity bean associations/relationships
- 第 6 章 对象/关系数据库映射基础(Basic O/R Mapping)
- Entity Framework 4 in Action读书笔记——第七章:持久化对象到数据库:持久化修改的实体到数据库
- ADO.NET Entity Framework 如何:自定义建模和映射文件以使用自定义对象(实体框架)
- DBLayer wizard ,一个国外写的数据库访问和实体映射的自动生成工具
- NHibernate如何实现对象与数据库之间的映射
- 第 6 章 对象/关系数据库映射基础(Basic O/R Mapping)
- 如果Oracle中的字段和数据库的系统字段重名,怎么配置NHibernate的映射实体文件
- c#利用反射+特性实现简单的实体映射数据库操作类实现自动增删改查(一)
- 关于对 实体封装的对象 进行数据库操作时需要注意的问题
- 业务对象到关系数据库映射的若干模式 (1)
- 类文件到映射文件再到数据库文件工具(对象建模工具)