commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict" <pbened...@apache.org>
Subject Re: BeanUtils: dirty checking
Date Wed, 05 Mar 2008 16:01:40 GMT
I implement a lot of requirements where I must capture the difference of
entities. I've seen so much custom code for this kind of thing.

Paul

On Wed, Mar 5, 2008 at 9:44 AM, James Carman <james@carmanconsulting.com>
wrote:

> On 3/5/08, Niall Pemberton <niall.pemberton@gmail.com> wrote:
> > On Wed, Mar 5, 2008 at 3:33 PM, Paul Benedict <pbenedict@apache.org>
> 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: user-unsubscribe@commons.apache.org
> >  For additional commands, e-mail: user-help@commons.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message