package com.rthoni.camotion.business;

import com.luticate.utils.business.LuBusinessManager;
import com.luticate.utils.business.LuPromise;
import com.luticate.utils.dbo.LuDataAccessConfigDbo;
import com.rthoni.camotion.dataaccess.SensorsDataAccess;
import com.rthoni.camotion.dbo.SensorDbo;
import com.rthoni.camotion.dbo.SensorValueDbo;

/**
 * Created by robin on 12/3/15.
 */
public class SensorsBusiness extends LuBusinessManager {
    public static LuPromise<SensorDbo.MultipleSensorDbo> getAll(LuDataAccessConfigDbo config, int page, int perPage)
    {
        return SensorsDataAccess.getAll(config, page, perPage);
    }

    public static LuPromise<SensorValueDbo> getValue(LuDataAccessConfigDbo config, SensorDbo sensor)
    {
        return SensorsDataAccess.getValue(config, sensor.getId());
    }
}
