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:
An other approach would be to encapsulate metadata and content in their own objects:
What are the advantages / disadvantages of these approaches? Which one would you suggest me to use?
Thanks!
Edit
The metadata and the content are stored in different files which I load lazily. So the metadata or content of the object is not available if it´s not requested. There is no special behaviour in the object. Just getter and setter.