package org.slc.sli.api.service.query;

import org.springframework.data.mongodb.core.query.Query;

/**
 * Define the interface for converting http GET request query string
 * to spring data query object
 *
 * @author dong liu <dliu@wgen.net>
 *
 */
public interface QueryConverter {

    /**
     * @param entityType
     *            the entity type that query will be applied to
     * @param queryString
     *            the query string received from http GET request
     * @return the converted spring data query object
     */
    public Query stringToQuery(String entityType, String queryString);

    /**
     * @param entityType
     *            the entity type that query will be applied to
     * @param queryParam
     *            the query parameter that received from http GET request
     * @return the type of query parameter that matches the entity avro schema
     */
    public String findParamType(String entityType, String queryParam);
}

@@ -198,16 +198,427 @@
 bject%0A *
+ %0A * The general format of a query string that uses filtering is as follows:%0A * ?attribute1=value1&attribute2%3Evalue2&attribute3!=value3@attribute4%3E=value4...%0A * %0A * Use dot to represent the nested fields%0A * %0A * Some examples of query string (for student entity)%0A * %0A * ?name.firstName=Joe&name.lastName=Brown%0A * ?birthData.birthDate%3E=1995-01-01%0A * ?studentUniqueStateId=123456789%0A * ?name.firstName!=Joe%0A * %0A * 
 %0A * @aut
@@ -648,16 +648,17 @@
 .net%3E%0A *
+ 
 %0A */%0Apub

add documentation for queryconverter in api