-
Mar 4th, 2012, 12:18 AM
#1
Ideas for reducing number of properties in my domain objects?
I have a domain object called User that is becoming bloated due to all of the properties and getters/setters. I want to group some of the related properties together into a single object somehow. I have never done this before so I was wondering if anyone had any ideas on how this could be best accomplished.
For example i have:
private Set<Group> ownedGroups = new HashSet<Group>();
private Set<GroupMember> joinedGroups = new HashSet<GroupMember>();
private Set<GroupInvite> groupInvites = new HashSet<GroupInvite>();
It would be nice to somehow group them together. I believe I still want those to be in separate tables still. Maybe I could create an object called GroupData that would have all three of those sets as properties?
I'm using hibernate3 and spring2.5.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules