Groovy
  1. Groovy
  2. GROOVY-2879

Create @Identity annotation to autogenerate equals() / hashCode() / toString()

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.6
    • Fix Version/s: 1.8-beta-1
    • Component/s: None
    • Labels:
      None

      Description

      The new @Bindable annotation is great. It (further) reduces the amount of boilerplate code required in Groovy beans. The next logical step is an @Identity annotation that can be applied to one or more attributes, telling Groovy that those properties define the identity / business key / whatever-you-want-to-call-it of the bean. The object's equals(), hashCode() and toString() would behave accordingly.

      May be related to GROOVY-27, but I'm not sure (was marked Won't Fix).

        Activity

        Daniel Gredler created issue -
        Paul King made changes -
        Field Original Value New Value
        Attachment groovy2879_mutable_transform.patch [ 50069 ]
        Paul King made changes -
        Attachment groovy2879_mutable_transform_updated.patch [ 50075 ]
        Paul King made changes -
        Attachment groovy2879_canonical_transform_updated.patch [ 50106 ]
        Paul King made changes -
        Attachment groovy2879_canonical_transform_updated2.patch [ 50134 ]
        Paul King made changes -
        Attachment groovy2879_canonical_transform_updated3.patch [ 50139 ]
        Paul King made changes -
        Attachment groovy2879_canonical_transform_updated4.patch [ 50172 ]
        Paul King made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Paul King [ paulk ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.8-beta-1 [ 16013 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12731898 ] Default workflow, editable Closed status [ 12743778 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12969879 ] Default workflow, editable Closed status [ 12977613 ]

          People

          • Assignee:
            Paul King
            Reporter:
            Daniel Gredler
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development