Details

    • Sub-task
    • Status: Closed
    • Normal
    • Resolution: Outdated
    • None
    • None
    • None
    • None

    Description

      Comment by Woonsan:

      "How about using org.apache.commons.beanutils.PropertyUtils#getPropertyDescriptor() or #getPropertyDescriptors(), instead of custom codes in DocumentObjectBinder.java, for simplicity?
      You can use PropertyDescriptor#getReadMethod() and #getWriteMethod() to read annotations.
      Also, you can use PropertyUtils#getProperty() and #setProperty() methods to leverage automatic type conversions for well-known types.
      You can provide PropertyEditors (to be set for a propertyDescriptor) for bytes, ByteBuffer, Calendar and Date. Then you can only invoke #set() and #get(), which I think helps make the codes much cleaner.
      Additionally, FYI, see the example in NamespacedBeanMethodInvoker.java which finds property names from the methods.
      Regarding #doGetAnnotatedMethod() method to find the proper method declaration in the hierarchy, isn't it simply possible to make the annotation inherited by adding @Inherited in the @IndexField annotation interface? "

      Attachments

        Activity

          People

            aschrijvers Ard Schrijvers
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: