igniteui-webcomponents-datasources
Version:
Reference custom data providers for the Ignite UI Web Components data source.
69 lines (68 loc) • 2.04 kB
JavaScript
var EntitySet = /** @class */ /*@__PURE__*/ (function () {
function EntitySet(name, entityType) {
this._entityName = null;
this._entityNamespace = null;
this._entityType = null;
this._name = null;
this.name = name;
this.entityType = entityType;
if (entityType.indexOf(".") >= 0) {
var parts = entityType.split('.');
if (parts.length == 2) {
this.entityNamespace = parts[0];
this.entityName = parts[1];
}
else {
var i = entityType.lastIndexOf('.');
this.entityNamespace = entityType.substr(0, i);
this.entityName = entityType.substr(i + 1);
}
}
else {
this.entityNamespace = entityType;
this.entityName = entityType;
}
}
Object.defineProperty(EntitySet.prototype, "entityName", {
get: function () {
return this._entityName;
},
set: function (value) {
this._entityName = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EntitySet.prototype, "entityNamespace", {
get: function () {
return this._entityNamespace;
},
set: function (value) {
this._entityNamespace = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EntitySet.prototype, "entityType", {
get: function () {
return this._entityType;
},
set: function (value) {
this._entityType = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(EntitySet.prototype, "name", {
get: function () {
return this._name;
},
set: function (value) {
this._name = value;
},
enumerable: false,
configurable: true
});
return EntitySet;
}());
export { EntitySet };