01: package com.technoetic.xplanner.domain;
02:
03: import java.util.Map;
04: import java.util.HashMap;
05: import java.util.List;
06: import java.util.ArrayList;
07:
08: public class DomainClass {
09: private Class javaClass;
10: private String typeName;
11: private String parentProperty;
12: private Class parentClass;
13: private String childrenProperty;
14: private Map actionByName = new HashMap();
15: private List actions = new ArrayList();
16:
17: public DomainClass(String typeName, Class myClass) {
18: this .javaClass = myClass;
19: this .typeName = typeName;
20: }
21:
22: public DomainClass(String typeName, Class myClass,
23: String parentProperty, Class parentClass,
24: String childrenProperty) {
25: this (typeName, myClass);
26: this .parentProperty = parentProperty;
27: this .parentClass = parentClass;
28: this .childrenProperty = childrenProperty;
29: }
30:
31: public String getParentProperty() {
32: return parentProperty;
33: }
34:
35: public String getChildrenProperty() {
36: return childrenProperty;
37: }
38:
39: public String getTypeName() {
40: return typeName;
41: }
42:
43: public Class getParentClass() {
44: return parentClass;
45: }
46:
47: public Class getJavaClass() {
48: return javaClass;
49: }
50:
51: public List getActions() {
52: return actions;
53: }
54:
55: public Map getActionByName() {
56: return actionByName;
57: }
58:
59: public void setActionByName(Map actionByName) {
60: this .actionByName = actionByName;
61: }
62:
63: public void addMapping(ActionMapping action) {
64: this.actions.add(action);
65: this.actionByName.put(action.getName(), action);
66: }
67:
68: }
|