define([
	'Global',
	'WaitListEntryRecall'
],
    function (Global, WaitListEntryRecall) {
        'use strict';
        return Backbone.Collection.extend({
            model: WaitListEntryRecall,
            initialize: function (options) {
                this.options = options || {};
                this.type = options ? options.type : "";
            },
            parse: function (response) {
	            this.currentPage = response.currentPage;
	            this.pageCount = response.pageCount;
	            this.recordCount = response.recordCount;
	            this.startRecord = response.startRecord;
	            this.stopRecord = response.stopRecord;

	            return response.waitListEntry;
            },
            findById: function (id) {
                return this.find(function (model) {
                    return model.get("waitListId") === id;
                });
            }
        });
    }
);