We can change genericDao to protected, but I don't see how it solves
your problem. This interface doesn't have the
"getTopLevelCategories()" method, so you'll still need to set your
categoryDao.

Matt

On 1/29/07, climbingrose <[EMAIL PROTECTED]> wrote:
I wonder what would be the appropriate way to extend GenericManager and
GenericManagerImpl to add custom behaviours?
What I have done is:

public class CategoryManagerImpl extends GenericManagerImpl implements
     CategoryManager {

    private CategoryDao categoryDao;

    public CategoryManagerImpl(CategoryDao categoryDao) {
    super(categoryDao);
    this.categoryDao = categoryDao;
    }

     public List getTopLevelCategories() {
    return categoryDao.getTopLevelCategories();
    }

}

I haven't looked at GenericManagerImpl source code but it seems to contain a
private instance of GenericDao (genericDao). Obvious if genericDao is
protected then I don't ned categoryDao anymore.

--
Regards,

Cuong Hoang


--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to