org.perfectjpattern.jee.integration.dao.jpa
Class MovieGenericDao
java.lang.Object
org.perfectjpattern.jee.integration.dao.JpaBaseDao<Id,Element>
org.perfectjpattern.jee.integration.dao.HibernateGenericDao<Id,Element>
org.perfectjpattern.jee.integration.dao.AbstractHibernateManagedGenericDao<Long,Movie>
org.perfectjpattern.jee.integration.dao.jpa.MovieGenericDao
- All Implemented Interfaces:
- IBaseDao<Long,Movie>, IBaseReadOnlyDao<Long,Movie>, IGenericDao<Long,Movie>, IGenericReadOnlyDao<Long,Movie>, IMovieGenericDao
public class MovieGenericDao
- extends AbstractHibernateManagedGenericDao<Long,Movie>
- implements IMovieGenericDao
EJB implementation of IMovieGenericDao
. Exposes managed
EJB reusing all of the PerfectJPattern's IGenericDao
facilities
- Version:
- $Revision: 1.0 $Date: Feb 11, 2009 11:31:24 AM $
- Author:
- Giovanni Azua
-
-
Methods inherited from class org.perfectjpattern.jee.integration.dao.JpaBaseDao |
contains, count, create, delete, deleteAll, findAll, findById, getPersistentClass, getSession, getSessionStrategy, getTransaction, getTransactionStrategy, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MovieGenericDao
public MovieGenericDao()
setEntityManager
public void setEntityManager(javax.persistence.EntityManager anEntityManager)
- Description copied from class:
JpaBaseDao
- Sets the
EntityManager
, called from a managed EJB that exposes
IGenericReadOnlyDao
or IGenericDao
remotely.
- Overrides:
setEntityManager
in class JpaBaseDao<Long,Movie>
- Parameters:
anEntityManager
- The EntityManager
to set
findByYear
public List<Movie> findByYear(int aYear)
- Returns matching
Movie
instances found. Searches for movies
by year. Example how to implement custom finder methods on top of
IGenericReadOnlyDao.findByExample(Object, String...)
- Specified by:
findByYear
in interface IMovieGenericDao
- Parameters:
aYear
- Year to search for
- Returns:
- matching
Movie
instances found
Copyright © 2007-2009. All Rights Reserved.