O'Reilly logo

Enterprise Application Development with Ext JS and Spring by Gerald Gierer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required