view src/main/java/de/intevation/service/LProbeService.java @ 25:34d7ecfba8d1

Added Relation to Kommentare by using the atomatic generation from database scheme. Doesn't work as expected and so I needed to add some extra code (eg. insertable/updateable=false)
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 26 Apr 2013 19:52:21 +0200
parents dc3bfcc5f717
children
line wrap: on
line source
package de.intevation.service;

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.model.LProbe;

@Stateless
public class LProbeService {

    @Inject
    private Logger log;

    @Inject
    private EntityManager em;

//    @Inject
//    private Event<Member> memberEventSrc;

    @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);
        //memberEventSrc.fire(member);
    }
}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)