@@ -0,0 +1,3011 @@
+/*%0A * Copyright 2017 Luca Capra %3Clcapra@fbk.eu%3E.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.createnet.raptor.models.query;%0A%0Aimport java.time.Instant;%0Aimport org.createnet.raptor.models.data.types.instances.DistanceUnit;%0Aimport org.springframework.data.geo.Point;%0A%0A/**%0A * Create prestructured data queries %0A * @author Luca Capra %3Clcapra@fbk.eu%3E%0A */%0Apublic class RecordSetQuery %7B%0A%0A//    /**%0A//     * Search for a match on a provided field%0A//     *%0A//     * @param field%0A//     * @param value%0A//     * @return%0A//     */%0A//    public static DataQuery match(String field, String value) %7B%0A//        return new DataQuery().setMatch(field, value);%0A//    %7D%0A//    %0A//    /**%0A//     * Search for result from a specified time until now%0A//     *%0A//     * @param from%0A//     * @return%0A//     */%0A//    public static DataQuery timeRange(Instant from) %7B%0A//        return new DataQuery().timeRange(from);%0A//    %7D%0A//%0A//    /**%0A//     * Search for result in a time frame range%0A//     *%0A//     * @param from%0A//     * @param to%0A//     * @return%0A//     */%0A//    public static DataQuery timeRange(Instant from, Instant to) %7B%0A//        return new DataQuery().timeRange(from, to);%0A//    %7D%0A//%0A//    /**%0A//     * Search for result in a geo-spatial bounding box%0A//     *%0A//     * @param nw top-left coordinate%0A//     * @param se bottom-right coordinate%0A//     * @return%0A//     */%0A//    public static DataQuery boundingBox(Point nw, Point se) %7B%0A//        return new DataQuery().boundingBox(nw, se);%0A//    %7D%0A//%0A//    /**%0A//     * Search for result in the radius of a geo-spatial point%0A//     *%0A//     * @param point%0A//     * @param distance%0A//     * @param unit%0A//     * @return%0A//     */%0A//    public static DataQuery distance(Point point, double distance, DistanceUnit unit) %7B%0A//        return new DataQuery().distance(point, distance, unit);%0A//    %7D%0A//%0A//    /**%0A//     * Search for results in a numeric range%0A//     *%0A//     * @param field a channel name of type numeric%0A//     * @param from%0A//     * @param to%0A//     * @return%0A//     */%0A//    public static DataQuery range(String field, double from, double to) %7B%0A//        return new DataQuery().range(field, from, to);%0A//    %7D%0A//%0A//    /**%0A//     * Search for results in a numeric range%0A//     *%0A//     * @param field a channel name of type numeric%0A//     * @param from%0A//     * @param to%0A//     * @return%0A//     */%0A//    public DataQuery range(String field, long from, long to) %7B%0A//        return new DataQuery().range(field, from, to);%0A//    %7D%0A%0A    %0A%7D%0A

migrate rsquery to models