/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.ejb3.test.standalone;

import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;

/**
 * Comment
 *
 * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
 * @version $Revision: 1.2 $
 */
@Stateless
public class CustomerDAOBean implements CustomerDAO
{
   @Resource private EntityManager manager;

   public long createCustomer()
   {
      Customer cust = new Customer();
      cust.setName("Bill");
      manager.persist(cust);
      return cust.getId();
   }

   public Customer findCustomer(long id)
   {
      return manager.find(Customer.class, id);
   }
}
