File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Taking Backup of Java Object instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Taking Backup of Java Object instance" Watch "Taking Backup of Java Object instance" New topic
Author

Taking Backup of Java Object instance

kalyanakannan dhakshinamoorthi
Greenhorn

Joined: Jan 14, 2013
Posts: 1
Need of Back-up Object instance,if further modification on object can be restored from old instance.

Joe Areeda
Ranch Hand

Joined: Apr 15, 2011
Posts: 316
    
    2

kalyanakannan dhakshinamoorthi wrote:Need of Back-up Object instance,if further modification on object can be restored from old instance.

Hi Kaly

Welcome to the ranch.

I'm not sure I understand your question a bit more detail will help us be more specific. But that won't stop me from guessing what you mean.

There is a clone method defined for many objects. You will have to override it to make sure it's complete for your objects. When I googled for a good link for you I saw many hits saying don't use it without considering the consequences.

However if I understand what your question is it seems appropriate.

something like:



or


Note that just assigning temp=in will just add another reference to the same object so changing one changes both.

Joe

It's not what your program can do, it's what your users do with the program.
 
 
subject: Taking Backup of Java Object instance