UNPKG

@sap-ux/store

Version:

NPM module for storing persistent data

36 lines 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SystemMigrationStatusDataProvider = void 0; const system_migration_status_1 = require("../entities/system-migration-status"); const constants_1 = require("./constants"); const filesystem_1 = require("../data-access/filesystem"); const SystemMigrationStatusDataProvider = class { dataAccessor; entityName = constants_1.Entities.SystemMigrationStatus; logger; constructor(logger) { this.logger = logger; this.dataAccessor = (0, filesystem_1.getFilesystemStore)(this.logger); } read(key) { return this.dataAccessor.read({ entityName: this.entityName, id: key.getId() }); } write(entity) { return this.dataAccessor.write({ entityName: this.entityName, id: new system_migration_status_1.SystemMigrationStatusKey().getId(), entity }); } delete(_entity) { return this.dataAccessor.del({ entityName: this.entityName, id: new system_migration_status_1.SystemMigrationStatusKey().getId() }); } getAll() { return this.dataAccessor.getAll({ entityName: this.entityName }); } }; exports.SystemMigrationStatusDataProvider = SystemMigrationStatusDataProvider; //# sourceMappingURL=system-migration.js.map