CdiGenericDao.java :  » JPA » generic-dao » com » szczytowski » genericdao » impl » Java Open Source

Java Open Source » JPA » generic dao 
generic dao » com » szczytowski » genericdao » impl » CdiGenericDao.java
package com.szczytowski.genericdao.impl;

import java.io.Serializable;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import com.szczytowski.genericdao.api.IEntity;

/**
 * Implementation supporting Contexts and Dependency Injection.
 * 
 * @author Simon Lavigne-Giroux
 * 
 * @param <T> entity type, it must implements at least <code>IEntity</code>
 * @param <I> entity's primary key, it must be serializable
 * @see IEntity
 * 
 * @since 1.1
 */
public class CdiGenericDao<T extends IEntity<I>, I extends Serializable> extends GenericDao<T, I> {

  /**
   * Set entity manager.
   * 
   * @param entityManager entity manager
   */
  @Override
  @PersistenceContext
  public void setEntityManager(EntityManager entityManager) {
    super.setEntityManager(entityManager);
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.