Mercurial > lada > lada-server
comparison 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 |
comparison
equal
deleted
inserted
replaced
41:a0f6d3934bce | 42:28b9167e5a5b |
---|---|
1 package de.intevation.lada.manage; | |
2 | |
3 import java.util.logging.Logger; | |
4 | |
5 import javax.ejb.Stateless; | |
6 import javax.ejb.TransactionAttribute; | |
7 import javax.ejb.TransactionAttributeType; | |
8 import javax.inject.Inject; | |
9 import javax.persistence.EntityManager; | |
10 | |
11 import de.intevation.lada.model.LProbe; | |
12 | |
13 @Stateless | |
14 public class LProbeManager { | |
15 | |
16 @Inject | |
17 private Logger log; | |
18 | |
19 @Inject | |
20 private EntityManager em; | |
21 | |
22 @TransactionAttribute(TransactionAttributeType.REQUIRED) | |
23 public void delete(String id) throws Exception { | |
24 LProbe probe = em.find(LProbe.class, id); | |
25 log.info("Deleting " + probe.getProbeId()); | |
26 em.remove(probe); | |
27 } | |
28 } |