All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hypertrack.factory.GPSLogFactory Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package io.hypertrack.factory;

import io.hypertrack.model.GPSLog;
import io.hypertrack.model.HyperTrackArrayList;
import io.hypertrack.net.HyperTrackClient;
import io.hypertrack.net.HyperTrackException;

import java.util.Map;

/**
 * Factory class for GPSLog model.
 */
public class GPSLogFactory extends HyperTrackFactory {
    private static String modelUrl = "gps/";

    public GPSLogFactory(HyperTrackClient client) {
        super(client);
    }

    @Override
    protected GPSLog makeNew(Map params) {
        return new GPSLog(params);
    }

    @Override
    protected String getModelUrl() {
        return modelUrl;
    }

    public HyperTrackArrayList listFiltered(Map filters) {
        try {
            return getListAndCreate(filters, modelUrl + "filtered/");
        } catch (HyperTrackException e) {
            e.printStackTrace();
            throw new RuntimeException(e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy