In your service layer, say you have a method that does XX, is this how you would reference your Dao classes?
public class SomeServiceImpl implements SomeService
public void DoSomething(int someThingId){
UserDao userDao = this.daoFactory().GetUserDao();
SalesDao salesDao = this.daoFactory().GetSalesDao();
..
..
..
}
It gets a bit much to do this, and was hoping if there was a easier more elegant way?
I use Springframework to configure my application. This framework has the nice feature that enables me to Inject the dependencies into my service layer. Therefore the Service implementation looks something like that: