01: /*
02: * JBoss, Home of Professional Open Source
03: * Copyright 2005, JBoss Inc., and individual contributors as indicated
04: * by the @authors tag. See the copyright.txt in the distribution for a
05: * full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * published by the Free Software Foundation; either version 2.1 of
10: * the License, or (at your option) any later version.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this software; if not, write to the Free
19: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21: */
22: package org.jbpm.module.def;
23:
24: import java.io.*;
25:
26: import org.jbpm.graph.def.*;
27: import org.jbpm.module.exe.*;
28: import org.jbpm.util.EqualsUtil;
29:
30: public abstract class ModuleDefinition implements Serializable {
31:
32: long id = 0;
33: protected String name = null;
34: protected ProcessDefinition processDefinition = null;
35:
36: public ModuleDefinition() {
37: }
38:
39: public abstract ModuleInstance createInstance();
40:
41: // equals ///////////////////////////////////////////////////////////////////
42: // hack to support comparing hibernate proxies against the real objects
43: // since this always falls back to ==, we don't need to overwrite the hashcode
44: public boolean equals(Object o) {
45: return EqualsUtil.equals(this , o);
46: }
47:
48: // getters and setters //////////////////////////////////////////////////////
49:
50: public long getId() {
51: return id;
52: }
53:
54: public String getName() {
55: return name;
56: }
57:
58: public ProcessDefinition getProcessDefinition() {
59: return processDefinition;
60: }
61:
62: public void setProcessDefinition(ProcessDefinition processDefinition) {
63: this.processDefinition = processDefinition;
64: }
65: }
|