dimanche 12 avril 2015

How should I store metadata in an object?

In my Java application, I store some data in serveral files in a proprietary format. At runtime, the content and some metadata are stored in an object. In my current approach, the class looks like this:


all data stored in the object


An other approach would be to encapsulate metadata and content in their own objects:


enter image description here


What are the advantages / disadvantages of these approaches? Which one would you suggest me to use?


Thanks!


Aucun commentaire:

Enregistrer un commentaire