Mercurial > lada > lada-server
diff src/main/java/de/intevation/lada/data/SUmweltRepository.java @ 39:e0a5477f657e
Documentation.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 23 May 2013 15:29:13 +0200 |
parents | c20674399ad7 |
children |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/SUmweltRepository.java Thu May 23 14:50:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/data/SUmweltRepository.java Thu May 23 15:29:13 2013 +0200 @@ -11,12 +11,26 @@ 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); @@ -25,6 +39,12 @@ 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); }