3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
18 * Simple wrapper class that represents a set of records returned by a Proxy.
20 Ext.define('Ext.data.ResultSet', {
22 * @cfg {Boolean} loaded
23 * True if the records have already been loaded. This is only meaningful when dealing with
30 * The number of records in this ResultSet. Note that total may differ from this number.
36 * The total number of records reported by the data source. This ResultSet may form a subset of
37 * those records (see {@link #count}).
42 * @cfg {Boolean} success
43 * True if the ResultSet loaded successfully, false if any errors were encountered.
48 * @cfg {Ext.data.Model[]} records (required)
49 * The array of record instances.
53 * Creates the resultSet
54 * @param {Object} [config] Config object.
56 constructor: function(config) {
57 Ext.apply(this, config);
60 * @property {Number} totalRecords
62 * @deprecated Will be removed in Ext JS 5.0. Use {@link #total} instead.
64 this.totalRecords = this.total;
66 if (config.count === undefined) {
67 this.count = this.records.length;