I am develpoing an application whereby we have a class called SharedFolder which represents a storage for documents shared by employees in a company. I have another class called UserFolder which represents all the documents of a particular user. For both the classes, I am using a common table in the database named Document_Storage to store the documents.
Now I need an import functionality which allows an user to import documents from the SharedFolder to UserFolder. What is achieved underneath is that a copy of the same document is made in the Document_Storage and associated to the respective user.
What are the various ways by which you can do this in
Java. Is clone() method a good way to achieve this functionality? Please give your suggestions. Thank you.