changeset 172:8d88224f8ffc

Remove concrete managers.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 24 Jun 2013 14:13:29 +0200
parents 8bf3054109ba
children b7dcb347bfe4
files src/main/java/de/intevation/lada/manage/LKommentarMManager.java src/main/java/de/intevation/lada/manage/LKommentarPManager.java src/main/java/de/intevation/lada/manage/LMessungManager.java src/main/java/de/intevation/lada/manage/LMesswertManager.java src/main/java/de/intevation/lada/manage/LOrtManager.java src/main/java/de/intevation/lada/manage/LProbeManager.java src/main/java/de/intevation/lada/manage/LStatusManager.java src/main/java/de/intevation/lada/manage/LZusatzwertManager.java
diffstat 8 files changed, 0 insertions(+), 510 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/manage/LKommentarMManager.java	Mon Jun 24 14:12:06 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-package de.intevation.lada.manage;
-
-import javax.ejb.EJBTransactionRolledbackException;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.inject.Inject;
-import javax.persistence.EntityExistsException;
-import javax.persistence.EntityManager;
-import javax.persistence.TransactionRequiredException;
-
-import de.intevation.lada.model.LKommentarM;
-
-/**
- * This Manager provides databse operations for LKommentarM objects.
- *
- * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
- */
-@Stateless
-public class LKommentarMManager
-{
-    @Inject
-    private EntityManager em;
-
-    /**
-     * Delete a LKommentarM object by id.
-     *
-     * @param id
-     * @throws Exception
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void delete(String id) throws Exception {
-        LKommentarM kommentar = em.find(LKommentarM.class, id);
-        em.remove(kommentar);
-    }
-
-    /**
-     * Persist a new LKommentarM object in the database.
-     *
-     * @param kommentar The new LKommentarM object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void create(LKommentarM kommentar)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.persist(kommentar);
-    }
-
-    /**
-     * Updates a LKommentarM object in the database.
-     *
-     * @param kommentar The new LKommentarM object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void update(LKommentarM kommentar)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.merge(kommentar);
-    }
-}
--- a/src/main/java/de/intevation/lada/manage/LKommentarPManager.java	Mon Jun 24 14:12:06 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-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.EntityExistsException;
-import javax.persistence.EntityManager;
-import javax.persistence.TransactionRequiredException;
-
-import de.intevation.lada.model.LKommentarP;
-import de.intevation.lada.model.LKommentarPId;
-
-@Stateless
-public class LKommentarPManager
-{
-    @Inject
-    private EntityManager em;
-
-    @Inject
-    private Logger logger;
-
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void create(LKommentarP kommentar)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        TransactionRequiredException
-    {
-        LKommentarPId id = new LKommentarPId();
-        id.setProbeId(kommentar.getProbeId());
-        kommentar.setId(id);
-        em.persist(kommentar);
-    }
-}
--- a/src/main/java/de/intevation/lada/manage/LMessungManager.java	Mon Jun 24 14:12:06 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-package de.intevation.lada.manage;
-
-import javax.ejb.EJBTransactionRolledbackException;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.inject.Inject;
-import javax.persistence.EntityExistsException;
-import javax.persistence.EntityManager;
-import javax.persistence.TransactionRequiredException;
-
-import de.intevation.lada.model.LMessung;
-
-/**
- * This Manager provides database operations for LMessung objects.
- *
- * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
- */
-@Stateless
-public class LMessungManager
-{
-    @Inject
-    private EntityManager em;
-
-    /**
-     * Delete a LProbe object by id.
-     *
-     * @param id
-     * @throws Exception
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void delete(String id) throws Exception {
-        LMessung probe = em.find(LMessung.class, id);
-        em.remove(probe);
-    }
-
-    /**
-     * Persist a new LProbe object in the database using the LProbeValidator.
-     *
-     * @param probe The new LProbe object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void create(LMessung probe)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.persist(probe);
-    }
-
-    /**
-     * Updates a LProbe object in the database.
-     *
-     * @param probe The new LProbe object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void update(LMessung probe)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.merge(probe);
-    }
-}
--- a/src/main/java/de/intevation/lada/manage/LMesswertManager.java	Mon Jun 24 14:12:06 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-package de.intevation.lada.manage;
-
-import javax.ejb.EJBTransactionRolledbackException;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.inject.Inject;
-import javax.persistence.EntityExistsException;
-import javax.persistence.EntityManager;
-import javax.persistence.TransactionRequiredException;
-
-import de.intevation.lada.model.LMesswert;
-
-/**
- * This Manager provides databse operations for LMesswert objects.
- *
- * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
- */
-@Stateless
-public class LMesswertManager
-{
-    @Inject
-    private EntityManager em;
-
-    /**
-     * Delete a LProbe object by id.
-     *
-     * @param id
-     * @throws Exception
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void delete(String id) throws Exception {
-        LMesswert messwert = em.find(LMesswert.class, id);
-        em.remove(messwert);
-    }
-
-    /**
-     * Persist a new LMesswert object in the database.
-     *
-     * @param messwert The new LMesswert object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void create(LMesswert messwert)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.persist(messwert);
-    }
-
-    /**
-     * Updates a LMesswert object in the database.
-     *
-     * @param messwert The new LMesswert object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void update(LMesswert messwert)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.merge(messwert);
-    }
-}
--- a/src/main/java/de/intevation/lada/manage/LOrtManager.java	Mon Jun 24 14:12:06 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-package de.intevation.lada.manage;
-
-import javax.ejb.EJBTransactionRolledbackException;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.inject.Inject;
-import javax.persistence.EntityExistsException;
-import javax.persistence.EntityManager;
-import javax.persistence.TransactionRequiredException;
-
-import de.intevation.lada.model.LOrt;
-
-/**
- * This Manager provides databse operations for LOrt objects.
- *
- * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
- */
-@Stateless
-public class LOrtManager
-{
-    @Inject
-    private EntityManager em;
-
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void create(LOrt ort)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException{
-        em.persist(ort);
-    }
-
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void update(LOrt ort)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.merge(ort);
-    }
-}
--- a/src/main/java/de/intevation/lada/manage/LProbeManager.java	Mon Jun 24 14:12:06 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-package de.intevation.lada.manage;
-
-import java.util.logging.Logger;
-
-import javax.ejb.EJBTransactionRolledbackException;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.inject.Inject;
-import javax.persistence.EntityExistsException;
-import javax.persistence.EntityManager;
-import javax.persistence.TransactionRequiredException;
-
-import de.intevation.lada.model.LProbe;
-
-/**
- * This Manager provides databse operations for LProbe objects.
- *
- * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
- */
-@Stateless
-public class LProbeManager {
-
-    @Inject
-    private Logger log;
-
-    @Inject
-    private EntityManager em;
-
-    /**
-     * Delete a LProbe object by id.
-     *
-     * @param id
-     * @throws Exception
-     */
-    @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);
-    }
-
-    /**
-     * Persist a new LProbe object in the database using the LProbeValidator.
-     *
-     * @param probe The new LProbe object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void create(LProbe probe)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.persist(probe);
-    }
-
-    /**
-     * Updates a LProbe object in the database.
-     *
-     * @param probe The new LProbe object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void update(LProbe probe)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.merge(probe);
-    }
-}
--- a/src/main/java/de/intevation/lada/manage/LStatusManager.java	Mon Jun 24 14:12:06 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-package de.intevation.lada.manage;
-
-import javax.ejb.EJBTransactionRolledbackException;
-import javax.ejb.Stateless;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.inject.Inject;
-import javax.persistence.EntityExistsException;
-import javax.persistence.EntityManager;
-import javax.persistence.TransactionRequiredException;
-
-import de.intevation.lada.model.LStatus;
-
-/**
- * This Manager provides databse operations for LStatus objects.
- *
- * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
- */
-@Stateless
-public class LStatusManager
-{
-    @Inject
-    private EntityManager em;
-
-    /**
-     * Delete a LProbe object by id.
-     *
-     * @param id
-     * @throws Exception
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void delete(String id) throws Exception {
-        LStatus messwert = em.find(LStatus.class, id);
-        em.remove(messwert);
-    }
-
-    /**
-     * Persist a new LMesswert object in the database.
-     *
-     * @param messwert The new LMesswert object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void create(LStatus status)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.persist(status);
-    }
-
-    /**
-     * Updates a LMesswert object in the database.
-     *
-     * @param messwert The new LMesswert object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void update(LStatus status)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.merge(status);
-    }
-}
--- a/src/main/java/de/intevation/lada/manage/LZusatzwertManager.java	Mon Jun 24 14:12:06 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-package de.intevation.lada.manage;
-
-import javax.ejb.EJBTransactionRolledbackException;
-import javax.ejb.TransactionAttribute;
-import javax.ejb.TransactionAttributeType;
-import javax.inject.Inject;
-import javax.persistence.EntityExistsException;
-import javax.persistence.EntityManager;
-import javax.persistence.TransactionRequiredException;
-
-import de.intevation.lada.model.LZusatzWert;
-
-
-public class LZusatzwertManager
-{
-    @Inject
-    private EntityManager em;
-
-    /**
-     * Delete a LProbe object by id.
-     *
-     * @param id
-     * @throws Exception
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void delete(String id) throws Exception {
-        LZusatzWert zusatzwert = em.find(LZusatzWert.class, id);
-        em.remove(zusatzwert);
-    }
-
-    /**
-     * Persist a new LProbe object in the database using the LProbeValidator.
-     *
-     * @param probe The new LProbe object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void create(LZusatzWert zusatzwert)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.persist(zusatzwert);
-    }
-
-    /**
-     * Updates a LProbe object in the database.
-     *
-     * @param probe The new LProbe object.
-     *
-     * @throws EntityExistsException
-     * @throws IllegalArgumentException
-     * @throws TransactionRequiredException
-     */
-    @TransactionAttribute(TransactionAttributeType.REQUIRED)
-    public void update(LZusatzWert zusatzwert)
-    throws EntityExistsException,
-        IllegalArgumentException,
-        EJBTransactionRolledbackException,
-        TransactionRequiredException {
-        em.merge(zusatzwert);
-    }
-}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)