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

Reply via email to