2018-03-21 11:57:56 +01:00
|
|
|
package eu.eudat.data.dao;
|
2018-01-25 16:24:21 +01:00
|
|
|
|
2018-02-01 10:08:06 +01:00
|
|
|
|
2018-02-02 11:33:37 +01:00
|
|
|
import eu.eudat.queryable.QueryableList;
|
2018-03-21 11:16:32 +01:00
|
|
|
import eu.eudat.queryable.queryableentity.DataEntity;
|
2018-02-02 11:33:37 +01:00
|
|
|
|
2018-02-21 11:07:31 +01:00
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
|
|
2018-02-20 08:50:17 +01:00
|
|
|
public interface DatabaseAccessLayer<T extends DataEntity, I> {
|
2018-01-25 16:24:21 +01:00
|
|
|
T createOrUpdate(T item);
|
|
|
|
|
2018-02-21 11:07:31 +01:00
|
|
|
CompletableFuture<T> createOrUpdateAsync(T item);
|
|
|
|
|
2018-01-25 16:24:21 +01:00
|
|
|
T find(I id);
|
2018-02-01 15:04:36 +01:00
|
|
|
|
2018-02-21 11:07:31 +01:00
|
|
|
T find(I id, String hint);
|
|
|
|
|
2018-02-01 15:04:36 +01:00
|
|
|
void delete(T item);
|
2018-02-02 11:33:37 +01:00
|
|
|
|
|
|
|
QueryableList<T> asQueryable();
|
2018-01-25 16:24:21 +01:00
|
|
|
}
|