This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes dependency injection using concrete classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "dependency injection using concrete classes" Watch "dependency injection using concrete classes" New topic
Author

dependency injection using concrete classes

Sonx Nkuks
Ranch Hand

Joined: Aug 20, 2010
Posts: 47
Hi, i have followed the hibernate Factory implementation which uses abstractDAO for all my DAOs. I now need to inject my DAOs which extends this Abstract to Spring service layer (Manager class). Here's an example


Problem is basketDao is an interface, and all these crud methods (except findBasketByReference() which is unique to DAO) are abstract/generic therefore not implemented on any of my DAOs but on AbstractDAOImpl. So they aren't visible to the interface BasketDAO which is injected to the service. Can i inject rather BasketDAOImpl as it will access these methods
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Moving to our Object Relational Mapping forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dependency injection using concrete classes
 
Similar Threads
Compilation Error when using Generics
Spring Transaction using Spring AOP
Spring Hibernate Transaction
setter-based injection in Spring Framework
Spring-Hibernate transaction management