Can we implement modello's identity/identifier element in maven.mdo rather than hand-coding the identity methods?

-john

[email protected] wrote:
Modified: 
maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo
URL: 
http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo?rev=741511&r1=741510&r2=741511&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo 
(original)
+++ maven/components/branches/maven-2.0.x/maven-model/src/main/mdo/maven.mdo 
Fri Feb  6 10:27:17 2009
@@ -3213,6 +3213,37 @@
     {
         return inheritanceApplied;
     }
+
+    /**
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    public boolean equals( Object other )
+    {
+        if ( other instanceof ReportPlugin )
+        {
+            ReportPlugin otherPlugin = (ReportPlugin) other;
+
+            return getKey().equals( otherPlugin.getKey() );
+        }
+
+        return false;
+    }
+
+    /**
+     * @see java.lang.Object#hashCode()
+     */
+    public int hashCode()
+    {
+        return getKey().hashCode();
+    }
+
+    /**
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        return "ReportPlugin [" + getKey() + "]";
+    }
             ]]>
           </code>
         </codeSegment>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to