01: /**
02: *
03: */package org.emforge.xfer;
04:
05: import org.emforge.xfer.EmForgeObject;
06:
07: /**
08: * Contains base functionality for all EmForge objects
09: *
10: * @author szakusov, 15.04.2008: Implemented to transfer base information about EmForge objects
11: */
12: public class PrimitiveTO implements EmForgeObject {
13:
14: private static final String NOT_SPECIFIED = "<not specified>";
15:
16: protected long m_id;
17: protected String m_name;
18: protected String m_displayName;
19:
20: /**
21: * Default constructor
22: */
23: public PrimitiveTO() {
24:
25: this (NOT_SPECIFIED, NOT_SPECIFIED);
26: }
27:
28: /**
29: * @param i_name is the object wiki-name
30: * @param i_displayName is the object display name
31: */
32: public PrimitiveTO(String i_name, String i_displayName) {
33:
34: this (-1, i_name, i_displayName);
35: }
36:
37: /**
38: * @param i_id is the object id
39: * @param i_name is the object wiki-name
40: * @param i_displayName is the object display name
41: */
42: public PrimitiveTO(long i_id, String i_name, String i_displayName) {
43:
44: m_id = i_id;
45: m_name = i_name;
46: m_displayName = i_displayName;
47: }
48:
49: /**
50: * @see org.emforge.projectmanager.base.EmForgeObject#getId()
51: */
52: public Long getId() {
53:
54: return m_id;
55: }
56:
57: /**
58: * @see org.emforge.projectmanager.base.EmForgeObject#setId(java.lang.Long)
59: */
60: public void setId(Long i_id) {
61:
62: m_id = i_id;
63: }
64:
65: /**
66: * @see org.emforge.projectmanager.base.EmForgeObject#getName()
67: */
68: public String getName() {
69:
70: return m_name;
71: }
72:
73: /**
74: * @see org.emforge.projectmanager.base.EmForgeObject#setName(java.lang.String)
75: */
76: public void setName(String i_name) {
77:
78: m_name = i_name;
79: }
80:
81: /**
82: * @see org.emforge.projectmanager.base.EmForgeObject#getDisplayName()
83: */
84: public String getDisplayName() {
85:
86: return m_displayName;
87: }
88:
89: /**
90: * @see org.emforge.projectmanager.base.EmForgeObject#setDisplayName(java.lang.String)
91: */
92: public void setDisplayName(String i_displayName) {
93:
94: m_displayName = i_displayName;
95: }
96:
97: }
|