org.perfectjpattern.jee.integration.dao.jpa
Class MovieGenericDao

java.lang.Object
  extended by org.perfectjpattern.jee.integration.dao.JpaBaseDao<Id,Element>
      extended by org.perfectjpattern.jee.integration.dao.HibernateGenericDao<Id,Element>
          extended by org.perfectjpattern.jee.integration.dao.AbstractHibernateManagedGenericDao<Long,Movie>
              extended by 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
 

Constructor Summary
MovieGenericDao()
           
 
Method Summary
 List<Movie> findByYear(int aYear)
          Returns matching Movie instances found.
 void setEntityManager(javax.persistence.EntityManager anEntityManager)
          Sets the EntityManager, called from a managed EJB that exposes IGenericReadOnlyDao or IGenericDao remotely.
 
Methods inherited from class org.perfectjpattern.jee.integration.dao.HibernateGenericDao
findByExample, getActualSession
 
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
 
Methods inherited from interface org.perfectjpattern.jee.api.integration.dao.IGenericReadOnlyDao
findByExample
 
Methods inherited from interface org.perfectjpattern.jee.api.integration.dao.IBaseDao
create, delete, deleteAll, update
 
Methods inherited from interface org.perfectjpattern.jee.api.integration.dao.IBaseReadOnlyDao
contains, count, findAll, findById, getSession, getTransaction
 

Constructor Detail

MovieGenericDao

public MovieGenericDao()
Method Detail

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.