jbpm4.4下hibernate映射文件中表跟类的对应关系

jbpm.history.hbm.xml
package="org.jbpm.pvm.internal.history.model"
<class name="HistoryProcessInstanceImpl" table="JBPM4_HIST_PROCINST">
<class name="HistoryActivityInstanceImpl" table="JBPM4_HIST_ACTINST">
<class name="HistoryTaskImpl" table="JBPM4_HIST_TASK">
<class name="HistoryVariableImpl" table="JBPM4_HIST_VAR">
<class name="HistoryDetailImpl" table="JBPM4_HIST_DETAIL">

jbpm.task.hbm.xml
package="org.jbpm.pvm.internal.task"
<class name="TaskImpl" table="JBPM4_TASK" discriminator-value="T">
<class name="ParticipationImpl" table="JBPM4_PARTICIPATION">
<class name="SwimlaneImpl" table="JBPM4_SWIMLANE">

jbpm.repository.hbm.xml
<class name="org.jbpm.pvm.internal.repository.DeploymentImpl"  table="JBPM4_DEPLOYMENT">
<class name="org.jbpm.pvm.internal.repository.DeploymentProperty" table="JBPM4_DEPLOYPROP">
<class name="org.jbpm.pvm.internal.id.PropertyImpl" table="JBPM4_PROPERTY">

jbpm.identity.hbm.xml
package="org.jbpm.pvm.internal.identity.impl"
<class name="UserImpl" table="JBPM4_ID_USER">
<class name="MembershipImpl" table="JBPM4_ID_MEMBERSHIP">
<class name="GroupImpl" table="JBPM4_ID_GROUP">

jbpm.execution.hbm.xml
package="org.jbpm.pvm.internal.model"
<class name="ExecutionImpl" table="JBPM4_EXECUTION">
<class name="org.jbpm.pvm.internal.type.Variable"  table="JBPM4_VARIABLE">
<class name="org.jbpm.pvm.internal.lob.Lob" table="JBPM4_LOB">
<class name="org.jbpm.pvm.internal.job.JobImpl" table="JBPM4_JOB">

部分hql语句
<!-- ### HibernateJobDbSession QUERIES ################################## -->
<query name="findFirstAcquirableJob">
<![CDATA[
select job
from org.jbpm.pvm.internal.job.JobImpl as job
where (job.lockExpirationTime is null or job.lockExpirationTime <= :now)
and (job.dueDate is null or job.dueDate <= :now)
and job.retries > 0
and job.state != 'suspended'
order by job.dueDate asc
]]>
</query>

<query name="findExclusiveJobs">
<![CDATA[
select job
from org.jbpm.pvm.internal.job.JobImpl as job
where job.lockOwner is null
and job.processInstance = :processInstance
and job.isExclusive = true
and job.retries > 0
and job.state != 'suspended'
and (job.dueDate is null or job.dueDate <= :now)
order by job.dueDate asc
]]>
</query>
<query name="findFirstDueJob">
<![CDATA[
select job
from org.jbpm.pvm.internal.job.JobImpl as job
where job.lockOwner is null
and job.retries > 0
and job.state != 'suspended'
order by job.dueDate asc
]]>
</query>
<!-- ### HibernatePvmDbSession QUERIES ############################################# -->
<query name="findExecutionById">
<![CDATA[
select execution
from org.jbpm.pvm.internal.model.ExecutionImpl as execution
where execution.id = :id
]]>
</query>

<query name="findProcessInstanceById">
<![CDATA[
select processInstance
from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance
where processInstance.id = :processInstanceId
and processInstance.parent is null
and processInstance.state != 'suspended'
]]>
</query>

<query name="findProcessInstanceByIdIgnoreSuspended">
<![CDATA[
select processInstance
from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance
where processInstance.id = :processInstanceId
and processInstance.parent is null
]]>
</query>

<query name="findProcessInstanceIds">
<![CDATA[
select processInstance.id
from org.jbpm.pvm.internal.model.ExecutionImpl as processInstance
where processInstance.processDefinitionId = :processDefinitionId
and processInstance.parent is null
]]>
</query>

你可能感兴趣的:(Hibernate)