@@ -0,0 +1,1219 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0A%0Apackage edu.harvard.iq.dataverse;%0A%0Aimport java.util.List;%0Aimport javax.ejb.Stateless;%0Aimport javax.ejb.TransactionAttribute;%0Aimport javax.ejb.TransactionAttributeType;%0Aimport javax.inject.Named;%0Aimport javax.persistence.EntityManager;%0Aimport javax.persistence.PersistenceContext;%0Aimport javax.persistence.Query;%0A%0A/**%0A *%0A * @author skraffmiller%0A */%0A@Stateless%0A@Named%0Apublic class DatasetServiceBean %7B%0A    %0A    @PersistenceContext(unitName = %22VDCNet-ejbPU%22)%0A    private EntityManager em;%0A        %0A%0A    @TransactionAttribute(TransactionAttributeType.REQUIRED)%0A    public Dataset save(Dataset dataset) %7B%0A         return em.merge(dataset);%0A    %7D   %0A%0A    public Dataset find(Object pk) %7B%0A        return (Dataset) em.find(Dataset.class, pk);%0A    %7D    %0A    %0A    public List%3CDataset%3E findByOwnerId(Long ownerId) %7B%0A         Query query = em.createQuery(%22select object(o) from Dataset as o where o.owner.id =:ownerId order by o.name%22);%0A         query.setParameter(%22ownerId%22, ownerId);%0A         return query.getResultList();%0A    %7D  %0A    %0A    %0A%7D%0A

Add simple dataset service bean