import DataRecord from "./DataRecord"; import DataRecordDescriptor from "./DataRecordDescriptor"; import { DataProvider } from "./interfaces"; /** * Keeps information about a set of data records */ export default class DataRecordSet implements DataProvider { private _records; private _addedRecords; private _modifiedRecords; private _removedRecords; private _recordDescriptor; /** * The cached data of the record set */ private _data?; constructor(recordDescriptor: DataRecordDescriptor); initialize(data: any[]): void; getData(): any[]; get isModified(): boolean; findById(id: any): DataRecord | undefined; /** * Updates the record if it exists in _records according to an existing identifier. * If it does not exist, then adds it to the records * @param data The data to insert/update the record with */ set(data: any): void; /** * Replaces the data of the record that has the old data with the one of the new data * It is the only option of updating the record when no identifiers are provided or any * composite identifier is missing * @param oldData * @param newData */ update(oldData: any, newData: any): void; remove(data: any): void; /** * Resets the record set as when the data was initialized */ reset(): void; commit(callback: (addedRecords: any, modifiedRecords: any, removedRecords: any) => void): void; } //# sourceMappingURL=DataRecordSet.d.ts.map