comparison src/main/java/de/intevation/service/LProbeService.java @ 24:dc3bfcc5f717

Added functions to delete and create (stub) proben items. Currently are not working because of violations of foreign key constraits in the underlying database scheme.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 26 Apr 2013 18:06:21 +0200
parents
children
comparison
equal deleted inserted replaced
23:00ed8e5b05b6 24:dc3bfcc5f717
1 package de.intevation.service;
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.model.LProbe;
12
13 @Stateless
14 public class LProbeService {
15
16 @Inject
17 private Logger log;
18
19 @Inject
20 private EntityManager em;
21
22 // @Inject
23 // private Event<Member> memberEventSrc;
24
25 @TransactionAttribute(TransactionAttributeType.REQUIRED)
26 public void delete(String id) throws Exception {
27 LProbe probe = em.find(LProbe.class, id);
28 log.info("Deleting " + probe.getProbeId());
29 em.remove(probe);
30 //memberEventSrc.fire(member);
31 }
32 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)