On 3/5/08, Niall Pemberton <[EMAIL PROTECTED]> wrote:
> On Wed, Mar 5, 2008 at 3:33 PM, Paul Benedict <[EMAIL PROTECTED]> wrote:
>  > This question is about BeanUtils 1.8.
>  >
>  >  Does any functionality exist to compare two beans of the same type to
>  >  determine whether (a) it is dirty and (b) a list/set of differences of
>  >  properties?
>
>
> Not at the moment, but I think theres an open JIRA ticket for this
>  kind of thing somewhere:
>
>  http://commons.apache.org/beanutils/issue-tracking.html

It might be nice to just provide a List<String> BeanUtils.diff(Object
bean1, Object bean2) method which merely returns the properties that
are different between the two beans (a meaningful equals method would
have to be implemented for the property types of course).  Perhaps
that should go in PropertyUtils?

>
>  I have a "modified lazy DynaBean" implementation that can track
>  changes (you switch on/off the tracking as required) and you can get a
>  list of modified properties and their current and original values.
>  Works pretty well for us
>
>  Niall
>
>  >  Paul
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to