001: /**
002: *
003: */package org.emforge.base;
004:
005: import org.apache.commons.logging.Log;
006: import org.apache.commons.logging.LogFactory;
007: import org.emforge.xfer.EmForgeObject;
008:
009: /**
010: * Contains base functionality for all EmForge objects
011: *
012: * @author szakusov, 15.04.2008: Implemented to collect all base functionality of all EmForge objects
013: */
014: public class PrimitiveImpl implements EmForgeObject {
015:
016: private static final String NOT_SPECIFIED = null;
017:
018: protected final Log m_logger = LogFactory.getLog(getClass());
019:
020: protected Long m_id;
021: protected String m_name;
022: protected String m_displayName;
023:
024: /**
025: * Default constructor
026: */
027: public PrimitiveImpl() {
028:
029: this (NOT_SPECIFIED, NOT_SPECIFIED);
030: }
031:
032: /**
033: * @param i_name is the object wiki-name
034: * @param i_displayName is the object display name
035: */
036: public PrimitiveImpl(String i_name, String i_displayName) {
037:
038: this (null, i_name, i_displayName);
039: }
040:
041: /**
042: * @param i_id is the object id
043: * @param i_name is the object wiki-name
044: * @param i_displayName is the object display name
045: */
046: public PrimitiveImpl(Long i_id, String i_name, String i_displayName) {
047:
048: m_id = i_id;
049: m_name = i_name;
050: m_displayName = i_displayName;
051: }
052:
053: /**
054: * @see org.emforge.projectmanager.base.EmForgeObject#getId()
055: */
056: public Long getId() {
057:
058: return m_id;
059: }
060:
061: /**
062: * @see org.emforge.projectmanager.base.EmForgeObject#setId(java.lang.Long)
063: */
064: public void setId(Long i_id) {
065:
066: m_id = i_id;
067: }
068:
069: /**
070: * @see org.emforge.projectmanager.base.EmForgeObject#getName()
071: */
072: public String getName() {
073:
074: return m_name;
075: }
076:
077: /**
078: * @see org.emforge.projectmanager.base.EmForgeObject#setName(java.lang.String)
079: */
080: public void setName(String i_name) {
081:
082: m_name = i_name;
083: }
084:
085: /**
086: * @see org.emforge.projectmanager.base.EmForgeObject#getDisplayName()
087: */
088: public String getDisplayName() {
089:
090: return m_displayName;
091: }
092:
093: /**
094: * @see org.emforge.projectmanager.base.EmForgeObject#setDisplayName(java.lang.String)
095: */
096: public void setDisplayName(String i_displayName) {
097:
098: m_displayName = i_displayName;
099: }
100:
101: }
|