You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
argos/dmp-backend/elastic/src/main/java/eu/eudat/elastic/repository/Repository.java

23 lines
594 B
Java

6 years ago
package eu.eudat.elastic.repository;
import eu.eudat.elastic.criteria.Criteria;
import eu.eudat.elastic.entities.ElasticEntity;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.ExecutionException;
/**
* Created by ikalyvas on 7/5/2018.
*/
public interface Repository<ET extends ElasticEntity, C extends Criteria> {
ET createOrUpdate(ET entity) throws IOException;
ET findDocument(String id) throws IOException;
List<ET> query(C criteria) throws ExecutionException, InterruptedException, IOException;
boolean exists() throws IOException;
}