Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2879

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

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: 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).

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: