Mercurial > lada > lada-server
comparison src/main/java/de/intevation/data/LProbeRepository.java @ 23:00ed8e5b05b6
Added functions to Rest-Service to add and delete a item
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 26 Apr 2013 15:02:05 +0200 |
parents | de959fc71eda |
children | dc3bfcc5f717 |
comparison
equal
deleted
inserted
replaced
22:c19770952a6e | 23:00ed8e5b05b6 |
---|---|
33 private EntityManager em; | 33 private EntityManager em; |
34 | 34 |
35 public LProbe findById(Long id) { | 35 public LProbe findById(Long id) { |
36 return em.find(LProbe.class, id); | 36 return em.find(LProbe.class, id); |
37 } | 37 } |
38 | |
39 | |
40 public void delete(LProbe item) { | |
41 em.remove(item); | |
42 } | |
38 | 43 |
39 //public LProbe findByEmail(String email) { | 44 //public LProbe findByEmail(String email) { |
40 // CriteriaBuilder cb = em.getCriteriaBuilder(); | 45 // CriteriaBuilder cb = em.getCriteriaBuilder(); |
41 // CriteriaQuery<LProbe> criteria = cb.createQuery(LProbe.class); | 46 // CriteriaQuery<LProbe> criteria = cb.createQuery(LProbe.class); |
42 // Root<LProbe> member = criteria.from(LProbe.class); | 47 // Root<LProbe> member = criteria.from(LProbe.class); |