Mercurial > lada > lada-server
changeset 85:7b932d54719c
Set general error on loading items.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 07 Jun 2013 14:50:53 +0200 |
parents | 74a488e52dde |
children | d408eaa7c11b |
files | src/main/java/de/intevation/lada/data/Repository.java |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/Repository.java Fri Jun 07 14:40:06 2013 +0200 +++ b/src/main/java/de/intevation/lada/data/Repository.java Fri Jun 07 14:50:53 2013 +0200 @@ -56,7 +56,11 @@ * @return The requested object of type clazz */ public <T> T findById(Class<T> clazz, String id) { - return em.find(clazz, id); + T item = em.find(clazz, id); + if (item == null) { + this.setGeneralError(600); + } + return item; } /**