Uploaded image for project: 'Commons BeanUtils'
  1. Commons BeanUtils
  2. BEANUTILS-499

Use standard properties in DyanBean

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.9.2
    • None
    • DynaBean
    • None
    • Important

    Description

      According to read the source code, there are a lot of util method do the job based on different type of bean. Such as
      public void copyProperties(Object dest, Object orig)
      if dynamic bean, copy property in dynamic class
      if standard bean. copy property except "class"

      Is it possible to mix the standard bean and dynamic bean? That means there are standard propertied in the dynamic bean. For current utils, these properties will not be processed.

      Because if the bean is dynamic,
      DynaProperty[] origDescriptors =
      ((DynaBean) orig).getDynaClass().getDynaProperties();
      if standard bean:
      PropertyDescriptor[] origDescriptors =
      getPropertyDescriptors(orig);

      I have tried to override these methods and according to my experience, this is not very difficult. But is there any principle or some consideration for this design? or is there any more good solution so solve my requirement?

      Attachments

        Activity

          People

            Unassigned Unassigned
            mengxin Xin Meng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: