package com.p3.bewoplaner.data.repository;

import com.p3.bewoplaner.data.repository.specifications.Specification;

import java.util.List;

import rx.Completable;
import rx.Observable;

/**
 * Created by Rares Teodorescu on 11/01/2017.
 */
interface Repository<T> {

    Completable add(Iterable<T> items);

    Completable update(T item, Specification specification);

    Completable update(Iterable<T> items, Specification specification);

    Completable remove(Specification specification);

    Observable<T> queryForOneById(String id, Specification specification);

    Observable<List<T>> queryForAll(Specification specification);

    Completable removeAll();
}