deep cloning an object via interfaces?

Discussion in 'Java' started by Elhanan, Dec 27, 2006.

  1. Elhanan

    Elhanan Guest

    hi

    i'm have a tree of simple beans. this tree should pupoulated from an
    xml data source which is VERY different structure, so no xml binding or
    xsl would do the trick.

    i was thinking of creating a tree of adapters which will implement the
    same interface as the tree of beans, so externally there should be no
    difference.

    i then thought of using some sort of clone method which will simply go
    though each getter and place it in new objetct's setter, the commons
    copyProperties method almost does this, but it only does shallow copies
    of collections (so i have to create a method what willl go through each
    item in a collection an use it's clone method as well.

    any ideas?
     
    Elhanan, Dec 27, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Neven Klofutar

    Deep cloning

    Neven Klofutar, Jul 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    525
    =?Utf-8?B?bG9uZG9uIGNhbGxpbmc=?=
    Jul 7, 2005
  2. Joris Bleys

    deep cloning for container class

    Joris Bleys, Jul 31, 2003, in forum: Java
    Replies:
    1
    Views:
    828
    Joris Bleys
    Jul 31, 2003
  3. Joris Bleys
    Replies:
    3
    Views:
    416
    Tim Tyler
    Aug 19, 2003
  4. Will Clark

    Re: Cloning String object

    Will Clark, Aug 23, 2003, in forum: Java
    Replies:
    0
    Views:
    6,188
    Will Clark
    Aug 23, 2003
  5. ezeget.com

    Web Part INterfaces SSRS Deep INtegration and Sharepoint

    ezeget.com, Oct 9, 2007, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    259
    ezeget.com
    Oct 25, 2007
  6. Eric Mahurin

    Cloning into an object

    Eric Mahurin, Apr 30, 2005, in forum: Ruby
    Replies:
    3
    Views:
    180
    Charles Steinman
    May 1, 2005
  7. Rajinder Yadav

    deep cloning, how?

    Rajinder Yadav, Oct 14, 2009, in forum: Ruby
    Replies:
    28
    Views:
    413
    Robert Klemme
    Oct 20, 2009
  8. Replies:
    0
    Views:
    267
Loading...