If you're interested in functional programming, you might also want to checkout my second blog which i'm actively working on!!

Sunday, September 26, 2010

Hibernate and Spring - Part 5

So let's take a look at one of our domain object's DAO interface and implementation:
  • JobDao
  • JobDaoImpl






As you can see the only thing we still had to implement was the method getEntityClass(). I also added a method to find a job based on its workflowname and itemname and used my convenience methods.

It calls the findListByProperties on the DaoImpl which dynamically creates a HQL string and calls the findByNamedParam(String query, String[] parameters, Object[] values) on our hibernate template.

The querystring we end up with looks like

No comments:

Post a Comment