Mercurial > lada > lada-server
view src/main/java/de/intevation/lada/manage/LProbeManager.java @ 42:28b9167e5a5b
Renamed LProbeService to LProbeManager and moved to package 'manage'.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 24 May 2013 11:49:37 +0200 |
parents | src/main/java/de/intevation/lada/service/LProbeService.java@0dd63fcc9581 |
children | 8078fde8b02b |
line wrap: on
line source
package de.intevation.lada.manage; import java.util.logging.Logger; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; import javax.inject.Inject; import javax.persistence.EntityManager; import de.intevation.lada.model.LProbe; @Stateless public class LProbeManager { @Inject private Logger log; @Inject private EntityManager em; @TransactionAttribute(TransactionAttributeType.REQUIRED) public void delete(String id) throws Exception { LProbe probe = em.find(LProbe.class, id); log.info("Deleting " + probe.getProbeId()); em.remove(probe); } }