package ru.yandex.wmconsole.service.dao;

import ru.yandex.wmconsole.data.partition.WMCPartition;
import ru.yandex.wmtools.common.error.InternalException;
import ru.yandex.wmtools.common.service.AbstractDbService;

import java.util.Date;

/**
 * User: azakharov
 * Date: 24.07.13
 * Time: 19:14
 */
public class TblUsersDao extends AbstractDbService {

    public Date getOptionsUpdatedOn(long userId) throws InternalException {
        final String query = "SELECT options_updated_on FROM tbl_users WHERE user_id = ?";
        return getJdbcTemplate(WMCPartition.nullPartition()).safeQueryForTimestamp(query, userId);
    }
}
