Java Reference
In-Depth Information
Right-click on façade-bean.xsl and select Run .
The CatalogFaç gets generated. Select View | Refresh to add
the CatalogFaç class to the project. The EJB 3.0 session bean class
implements the EJB 3.0 session bean remote interface CatalogFaçade . The session
bean class generated is shown below:
import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.annotation.Resource;
import javax.ejb.Stateless;
public class CatalogFaçadeBean implements CatalogFaçade{
private EntityManager em;
public void create(String catalogId) {
CatalogBean catalogBean= new CatalogBean(catalogId);
em.persist(catalogBean); }
public void remove(CatalogBean catalogBean) {
em.remove(catalogBean); }
public CatalogBean findByCatalogId(java.lang.String param1) {
Query query=em.createNamedQuery("FindByCatalogId");
query.setParameter(0, param1);
Search WWH ::

Custom Search