01: package org.emforge.jbpm;
02:
03: import org.jbpm.graph.exe.ProcessInstance;
04: import org.jbpm.taskmgmt.exe.TaskInstance;
05:
06: /** This class is used for making relation between task instance
07: * and subprocess.
08: */
09: public class TaskSubProcess {
10: private Long m_id;
11:
12: private TaskInstance m_taskInstance;
13: private ProcessInstance m_processInstance;
14:
15: /**
16: * default constructor
17: */
18: public TaskSubProcess() {
19: }
20:
21: public TaskSubProcess(TaskInstance i_taskInstance,
22: ProcessInstance i_processInstance) {
23: m_taskInstance = i_taskInstance;
24: m_processInstance = i_processInstance;
25: }
26:
27: public Long getId() {
28: return m_id;
29: }
30:
31: public void setId(Long i_id) {
32: m_id = i_id;
33: }
34:
35: public ProcessInstance getProcessInstance() {
36: return m_processInstance;
37: }
38:
39: public void setProcessInstance(ProcessInstance i_processInstance) {
40: m_processInstance = i_processInstance;
41: }
42:
43: public TaskInstance getTaskInstance() {
44: return m_taskInstance;
45: }
46:
47: public void setTaskInstance(TaskInstance i_taskInstance) {
48: m_taskInstance = i_taskInstance;
49: }
50:
51: public boolean equals(Object obj) {
52: return (obj.getClass().equals(this .getClass())
53: && this .getId() != null && this .getId().equals(
54: ((TaskSubProcess) obj).getId()));
55: }
56: }
|