Mercurial > lada > lada-server
changeset 46:ff802c5e77f7
Removed unused repositories.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 24 May 2013 11:54:55 +0200 |
parents | a5ee8d69c0b4 |
children | c9cfb34983f0 |
files | src/main/java/de/intevation/lada/data/SMessstelleRepository.java src/main/java/de/intevation/lada/data/SUmweltRepository.java |
diffstat | 2 files changed, 0 insertions(+), 103 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/SMessstelleRepository.java Fri May 24 11:53:46 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -package de.intevation.lada.data; - -import java.util.List; - -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Root; - -import de.intevation.lada.model.SMessStelle; - -/** - * This Container is an interface to request, filter and select SMessStelle - * obejcts from the connected database. - * - * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> - */ -@ApplicationScoped -public class SMessstelleRepository -{ - - /** - * The entitymanager managing the data. - */ - @Inject - EntityManager em; - - /** - * Get all SMessStelle object from database. - * - * @return List of SMessStelle objects. - */ - public List<SMessStelle> findAll() { - CriteriaBuilder builder = em.getCriteriaBuilder(); - CriteriaQuery<SMessStelle> criteria = builder.createQuery(SMessStelle.class); - Root<SMessStelle> member = criteria.from(SMessStelle.class); - criteria.select(member); - return em.createQuery(criteria).getResultList(); - } - - /** - * Find a single SMessStelle object identified by its id. - * - * @param id The mst_id - * @return The SMessStelle object. - */ - public SMessStelle findById(String id) { - return em.find(SMessStelle.class, id); - } -}
--- a/src/main/java/de/intevation/lada/data/SUmweltRepository.java Fri May 24 11:53:46 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -package de.intevation.lada.data; - -import java.util.List; - -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.persistence.EntityManager; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Root; - -import de.intevation.lada.model.SUmwelt; - -/** - * This Container is an interface to request, filter and select LProbe - * obejcts from the connected database. - * - * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> - */ -@ApplicationScoped -public class SUmweltRepository { - - /** - * The entitymanager managing the data. - */ - @Inject - EntityManager em; - - /** - * Get all SUmwelt objects from database. - * - * @return List of LProbe objects. - */ - public List<SUmwelt> findAll() { - CriteriaBuilder builder = em.getCriteriaBuilder(); - CriteriaQuery<SUmwelt> criteria = builder.createQuery(SUmwelt.class); - Root<SUmwelt> member = criteria.from(SUmwelt.class); - criteria.select(member); - return em.createQuery(criteria).getResultList(); - } - - /** - * Find a single SUmwelt object identified by its id. - * - * @param id The mst_id - * @return The SMessStelle object. - */ - public SUmwelt findById(String id) { - return em.find(SUmwelt.class, id); - } -}