UNPKG

@sap-cloud-sdk/core

Version:
74 lines 3.33 kB
"use strict"; /* eslint-disable max-classes-per-file */ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.ComplexTypeStringPropertyField = exports.StringField = void 0; var complex_type_field_1 = require("../complex-type-field"); var edm_type_field_1 = require("../edm-type-field"); /** * @deprecated Since v1.47.0. Use [[EdmTypeField]] instead. * Represents a property with a string value. * @typeparam EntityT - Type of the entity the field belongs to */ var StringFieldBase = /** @class */ (function (_super) { __extends(StringFieldBase, _super); function StringFieldBase() { return _super !== null && _super.apply(this, arguments) || this; } return StringFieldBase; }(edm_type_field_1.EdmTypeField)); /** * @deprecated Since v1.47.0. Use [[EdmTypeField]] instead. * Represents a selectable property with a string value. * @typeparam EntityT - Type of the entity the field belongs to */ var StringField = /** @class */ (function (_super) { __extends(StringField, _super); function StringField() { return _super !== null && _super.apply(this, arguments) || this; } return StringField; }(StringFieldBase)); exports.StringField = StringField; /** * @deprecated Since v1.47.0. Use [[EdmTypeField]] instead. * Represents a complex type property with a string value. * @typeparam EntityT - Type of the entity the field belongs to */ var ComplexTypeStringPropertyField = /** @class */ (function (_super) { __extends(ComplexTypeStringPropertyField, _super); /* * Union of the two possible constructors. */ function ComplexTypeStringPropertyField(fieldName, fieldOf, arg3, arg4) { var _this = _super.call(this, fieldName, (0, complex_type_field_1.getEntityConstructor)(fieldOf), (0, complex_type_field_1.getEdmType)(arg3, arg4)) || this; _this.fieldOf = fieldOf; return _this; } /** * Path to the field to be used in filter and order by queries. Combines the parent complex type name with the field name. * @returns Path to the field to be used in filter and order by queries. */ ComplexTypeStringPropertyField.prototype.fieldPath = function () { return this.fieldOf instanceof complex_type_field_1.ComplexTypeField ? "".concat(this.fieldOf.fieldPath(), "/").concat(this._fieldName) : this._fieldName; }; return ComplexTypeStringPropertyField; }(StringFieldBase)); exports.ComplexTypeStringPropertyField = ComplexTypeStringPropertyField; //# sourceMappingURL=string-field.js.map