Catalin,
I am assuming a few things regarding the basic design of the classes here:
1. The Group class will have an aggregation of User class.
2. The Application class will have an aggregation of Group class.
That is the hierarchy I think you have. Please correct me if I am wrong.
Going by the above assumption, my design will have a mix of both your techniques. The actual statements to save the object information in the database will be in add, update, delete methods of the individual classes. Each of these methods will have all the required information passed as parameters.
I will use the ApplicationList, GroupList and UserList collections to save multiple instances of the respective objects. The add, update, delete methods in the list objects will iterate through all the elements in the list and call the respective add, update, delete methods of each idividual objects.
Please consider that the add, update, delete methods of the any Application object will have to iterate through the Group objects that are part of that Application object and call the add, update, delete methods of the respective Group objects. Smilary the methods for any Group object will have to iterate through the User objects that are part of that Group object and call the respective methods.
I hope that this helps.
Thanks.
Sanjib.