fr.ouestfrance.querydsl.postgrest.PostgrestClient Maven / Gradle / Ivy
package fr.ouestfrance.querydsl.postgrest;
import fr.ouestfrance.querydsl.postgrest.model.BulkResponse;
import fr.ouestfrance.querydsl.postgrest.model.CountItem;
import fr.ouestfrance.querydsl.postgrest.model.RangeResponse;
import java.util.List;
import java.util.Map;
/**
* Rest interface for querying postgrest
*/
public interface PostgrestClient {
/**
* Search method
*
* @param resource resource name
* @param params query params
* @param return type
* @param headers header params
* @param clazz type of return
* @return ResponseEntity containing the results
*/
RangeResponse search(String resource, Map> params,
Map> headers, Class clazz);
/**
* Save body
*
* @param resource resource name
* @param value data to save
* @param headers headers to pass
* @param return type
* @param clazz type of return
* @return list of inserted objects
*/
BulkResponse post(String resource, Map> queryParams, List