Java Reference
In-Depth Information
After clicking on Finish , the session beans are created and placed in the package we
All of the generated session bean extends AbstractFacade , an abstract class that
is also generated by the Session Beans for Entity Classes wizard. This abstract
class contains a number of methods that allow us to perform CRUD ( Create , Read ,
Update , Delete ) operations on our entities.
package com.ensode.ejbdao.sessionbeans;
import java.util.List;
import javax.persistence.EntityManager;
public abstract class AbstractFacade<T> {
private Class<T> entityClass;
public AbstractFacade(Class<T> entityClass) {
this.entityClass = entityClass;
protected abstract EntityManager getEntityManager();
public void create(T entity) {
Search WWH ::

Custom Search