If you are just planning on returning a query in all cases, I would
probably create a single method with an optional argument that accepts
list of codes. If no list of codes is passed it will retrieve all groups.
There is also nothing wrong with having separate methods such as:
getAllGroups()
getGroupsByCode()
Under the covers they may be doing just as I described above, but would
perhaps be more obvious as to their intended usage.
As to the question of the ideal number of methods in your listeners, I
would say that is much less of an issue than the problem of trying to
cram too much business logic into your listeners as opposed to
offloading that to your service layer, or the problem of having your
methods become to big and complex when they could be broken down into
smaller pieces.
~Dave