cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r572248 - in /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map: Attribute.java Entity.java
Date Mon, 03 Sep 2007 07:57:08 GMT
Author: aadamchik
Date: Mon Sep  3 00:57:07 2007
New Revision: 572248

URL: http://svn.apache.org/viewvc?rev=572248&view=rev
Log:
adding toString methods similar to what DataMap and Relationship define. This should save
some mouse clicks when doing Eclipse debugging

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Attribute.java
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Entity.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Attribute.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Attribute.java?rev=572248&r1=572247&r2=572248&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Attribute.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Attribute.java
Mon Sep  3 00:57:07 2007
@@ -25,6 +25,7 @@
 import org.apache.cayenne.util.CayenneMapEntry;
 import org.apache.cayenne.util.XMLEncoder;
 import org.apache.cayenne.util.XMLSerializable;
+import org.apache.commons.lang.builder.ToStringBuilder;
 
 /**
  * Defines a property descriptor that is a part of an Entity. Two examples of things that
@@ -48,6 +49,10 @@
      */
     public Attribute(String name) {
         this.name = name;
+    }
+    
+    public String toString() {
+        return new ToStringBuilder(this).append("name", getName()).toString();
     }
     
     public abstract void encodeAsXML(XMLEncoder encoder);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Entity.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Entity.java?rev=572248&r1=572247&r2=572248&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Entity.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/map/Entity.java
Mon Sep  3 00:57:07 2007
@@ -32,6 +32,7 @@
 import org.apache.cayenne.exp.ExpressionException;
 import org.apache.cayenne.util.CayenneMapEntry;
 import org.apache.cayenne.util.XMLSerializable;
+import org.apache.commons.lang.builder.ToStringBuilder;
 
 /**
  * An Entity is an abstract descriptor for an entity mapping concept. Entity can represent
@@ -64,6 +65,10 @@
         this.relationships = new TreeMap();
 
         setName(name);
+    }
+    
+    public String toString() {
+        return new ToStringBuilder(this).append("name", getName()).toString();
     }
 
     /**



Mime
View raw message