Created a document class following the Aggregate pattern of the DDD.
It does versioning of documents to prevent concurrent updates to a document by two different people.
This way it will prevent the integrity of the Document Object and list of Questions n Answers associated with it.
invariance and validations are done. And internal objects like Questions/Answers are not exposed to the outside world.
So the behavior is entirely controlled by the Aggregate root object Document
Created a document class following the Aggregate pattern of the DDD. It does versioning of documents to prevent concurrent updates to a document by two different people. This way it will prevent the integrity of the Document Object and list of Questions n Answers associated with it. invariance and validations are done. And internal objects like Questions/Answers are not exposed to the outside world. So the behavior is entirely controlled by the Aggregate root object Document