Mercurial > lada > lada-server
view src/main/java/de/intevation/lada/data/Repository.java @ 381:ea4d2d685f32
Added new method to filter data including limit and start for dataitems.
In most repositories only stubs returning 'null', implmented only in readonly repository.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 09 Oct 2013 14:54:34 +0200 |
parents | 8fdb699405aa |
children | 183f8116d9a6 |
line wrap: on
line source
package de.intevation.lada.data; import javax.persistence.EntityManager; import javax.persistence.criteria.CriteriaQuery; import de.intevation.lada.rest.Response; /** * This generic Container is an interface to request and select Data * obejcts from the connected database. * * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> */ public interface Repository { public Response create(Object object); public Response update(Object object); public Response delete(Object object); public <T> Response filter(CriteriaQuery<T> filter); public <T> Response filter(CriteriaQuery<T> filter, int size, int start); public <T> Response findAll(Class<T> clazz); public <T> Response findById(Class<T> clazz, String id); public EntityManager getEntityManager(); }