function Filtro() {
    var self = this;

    // fields
    self.urlFiltrar = "";

    // functions
    self.fnBeforeSend = function (jqXHR, settings) { };
    self.fnSuccess = function (data, textStatus, jqXHR) { };
    self.fnComplete = function (jqXHR, textStatus) { };
    self.fnError = function (jqXHR, textStatus, errorThrown) { };
    self.fnDone = function (data, textStatus, jqXHR) { };
    //self.fnFail = function (jqXHR, textStatus, errorThrown) { };
    //self.fnAlways = function(o, textStatus, jqXHR|errorThrown) { };
    //self.fnThen = function(data, textStatus, jqXHR) {}, function(jqXHR, textStatus, errorThrown) {};

    self.Filtrar = function () {
        var params = ko.toJSON(self);
        $.ajax({
            url: self.url,
            contentType: 'application/json; charset=utf-8',
            dataType: "json",
            type: "POST",
            data: params,
            beforeSend: self.fnBeforeSend,
            success: self.fnSuccess,
            complete: self.fnComplete,
            error: self.fnError
        }).done(self.fnDone);
    };

    // implementado em quem herda
    self.LimparFiltros = function () { };
}