Mercurial > lada > lada-server
view src/main/java/de/intevation/lada/util/data/Repository.java @ 450:808ea2091c1d
Updated repositoy structure and added probe services.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 11 Feb 2015 13:01:55 +0100 |
parents | f0ad10e0e1b1 |
children | 89a5dbeb5bd6 |
line wrap: on
line source
/* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz * Software engineering by Intevation GmbH * * This file is Free Software under the GNU GPL (v>=3) * and comes with ABSOLUTELY NO WARRANTY! Check out * the documentation coming with IMIS-Labordaten-Application for details. */ package de.intevation.lada.util.data; import javax.persistence.EntityManager; import javax.persistence.Query; import javax.persistence.criteria.CriteriaQuery; import de.intevation.lada.util.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, String dataSource); public Response update(Object object, String dataSource); public Response delete(Object object, String dataSource); public <T> Response filter(CriteriaQuery<T> filter, String dataSource); public <T> Response filter( CriteriaQuery<T> filter, int size, int start, String dataSource); public <T> Response getAll(Class<T> clazz, String dataSource); public <T> Response getById(Class<T> clazz, Object id, String dataSource); public Query queryFromString(String sql, String dataSource); public EntityManager entityManager(String dataSource); }