1 56 package org.objectstyle.cayenne.map; 57 58 import org.apache.commons.lang.builder.ToStringBuilder; 59 import org.objectstyle.cayenne.util.CayenneMapEntry; 60 import org.objectstyle.cayenne.util.XMLSerializable; 61 62 68 public abstract class MapObject implements CayenneMapEntry, XMLSerializable { 69 protected String objName; 70 protected Object objParent; 71 72 75 public MapObject() { 76 super(); 77 } 78 79 public MapObject(String name) { 80 setName(name); 81 } 82 83 86 public String getName() { 87 return objName; 88 } 89 90 93 public Object getParent() { 94 return objParent; 95 } 96 97 100 public void setParent(Object parent) { 101 this.objParent = parent; 102 } 103 104 108 public void setName(String name) { 109 this.objName = name; 110 } 111 112 public String toString() { 113 ToStringBuilder builder = new ToStringBuilder(this); 114 builder.append(getName()); 115 return builder.toString(); 116 } 117 } 118 | Popular Tags |