Search This Blog

Thursday 21 February 2013

Criteria and Inner joins

Few posts ago we saw HQL's extensive support for joins. I decided to check out Criteria's claims to the same. I decided to start out with Inner joins.

Wednesday 20 February 2013

Scheduling with Annotations

In my previous post we saw how to achieve scheduling using Quartz API and Spring. The thing about Quartz is that it adds an additional dependency in your project.If you have a simple project and do not need Quartz's heavy power, you can use Spring's own scheduling mechanism. I modified our previous example to use it.

Thursday 14 February 2013

SQL inside Criteria

We earlier how a custom criterion could be created to handle special scenarios. However this may seem overkill if the condition can be easily expressed using native SQL. For Criteria allows us to add custom SQL expressions which get added in the where clause.

Saturday 9 February 2013

Working with Quartz and Spring

In an earlier post we saw how Spring allows us to get scheduling done using Java's Timer Implementation. The timer schedulers has one shortcoming- There is no way to specify the time of the day when the task is to be run.An alternative and more powerful scheduler is the Quartz Scheduler.

Monday 4 February 2013

Scheduling via Spring

Spring provides support for scheduling activities. One way to do it is using java's Timer class. I created a simple program to display random messages.