Defining the generic DAO implementation

We will once again use Java generics to define a common ancestor class that will be extended by each of our implementation classes (CompanyDaoImpl, ProjectDaoImpl, TaskDaoImpl, TaskLogDaoImpl, and UserDaoImpl). The GenericDaoImpl and all other implementing classes will be added to the same com.gieman.tttracker.dao package as our DAO interfaces. Key lines of code in GenericDaoImpl are highlighted and will be explained in the following sections:

package com.gieman.tttracker.dao; import java.io.Serializable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.springframework.transaction.annotation.Propagation; ...

Get Enterprise Application Development with Ext JS and Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.