Group

7 views
Skip to first unread message

loldrup

unread,
Jul 18, 2011, 12:16:16 PM7/18/11
to Nimble
Hi

Nimble has this group-class 'Group.groovy'.
My application will use groups heavily, so I would like to tinker with
the Group class. Whats the best way to do this? Do I just edit the
Nimble group class or do make my own group class and make it extend
Nimble's group-class? The problem with extending it with my own group-
class is that I want to define groups recursively, using the composite
pattern, like this:

class Group extends Asset {
...
static hasMany = [ assets : Asset ]
}

class Person extends Asset {
...
}

As can be seen, this involves extending an interface 'Asset'. Then the
problem is that Group cannot simultaneously extend 'Asset' and the
nimble group class.


Whats a grails-programmer to do? I guess tinkering with Nimbles own
group-class might be unhealthy in the long run...


Jon

loldrup

unread,
Jul 18, 2011, 12:45:46 PM7/18/11
to Nimble
Maybe I could let Nimble's Group class extend my Asset class, and then
let my own Group-class extend Nimble's Group class... Would that be a
viable solution?
Reply all
Reply to author
Forward
0 new messages