com.scaleset.search.mongo.SearchMapping Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaleset-search Show documentation
Show all versions of scaleset-search Show documentation
Java object model for representing query requests in REST protocols.
package com.scaleset.search.mongo;
import com.mongodb.DBObject;
import com.scaleset.search.Query;
public interface SearchMapping {
String collection(T object) throws Exception;
String collectionForKey(K key) throws Exception;
String collectionForQuery(Query query) throws Exception;
T fromDocument(String id, DBObject doc) throws Exception;
String id(T obj) throws Exception;
String idForKey(K key) throws Exception;
DBObject toDocument(T obj) throws Exception;
SchemaMapper schemaMapperForQuery(Query query) throws Exception;
}