Mercurial > lada > lada-server
view src/main/java/de/intevation/lada/util/data/Repository.java @ 438:f0ad10e0e1b1
Moved Repositories, etc. into data package.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 06 Feb 2015 17:55:54 +0100 |
parents | |
children | 808ea2091c1d |
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.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); 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 getAll(Class<T> clazz); public <T> Response getById(Class<T> clazz, Object id); public Query queryFromString(String sql); public void setDataSource(String dataSource); public String getDataSource(); public void setEntityManagerProducer(EntityManagerProducer emp); }