define([], function() {
'use strict';
/**
* SPI object representing a single Entity Provider.
*
* <p>
* Provides list of {@link entity/js/api/Entity Entities} (an abstract representation of data structure used by REST service in it's input and output calls)
* which are provided by the relevant {@link bop/js/spi/BOP BOP}.
* </p>
*
* <p>
* {@link bop/js/spi/entity/EntityProvider EntityProvider} is one of the two main parts required to implement custom {@link bop/js/spi/BOP BOP}. The other one is
* {@link bop/js/spi/operation/OperationProvider OperationProvider}.
* </p>
*
* @AbcsExtension stable
* @version 17.1.1
* @exports bop/js/spi/entity/EntityProvider
*
* @constructor
* @private
*
* @see {@link bop/js/spi/BOP BOP}
* @see {@link bop/js/spi/operation/OperationProvider OperationProvider}
* @see {@link bop/js/api/entity/DataModelFactory DataModelFactory} to create {@link entity/js/api/Entity Entity}, {@link entity/js/api/Property Property} and {@link entity/js/api/Relation Relation} instances.
*
* @example
* <caption>
* Example of typical implementation of custom {@link bop/js/spi/entity/EntityProvider EntityProvider} used inside of the custom {@link bop/js/spi/BOP BOP}.
* </caption>
*
* define([
* 'bop/js/api/entity/DataModelFactory',
* 'entity/js/api/PropertyType'
* ], function (
* DataModelFactory,
* PropertyType
* ) {
*
* var CustomEntityProvider = function () {
* var firstname = DataModelFactory.createProperty({
* id: 'my.custom.bop.Employee.Firstname',
* name: 'Firstname',
* type: PropertyType.TEXT
* });
* var lastname = DataModelFactory.createProperty({
* id: 'my.custom.bop.Employee.Lastname',
* name: 'Lastname',
* type: PropertyType.TEXT
* });
* var age = DataModelFactory.createProperty({
* id: 'my.custom.bop.Employee.Age',
* name: 'Age',
* type: PropertyType.NUMBER
* });
* var employee = DataModelFactory.createEntity({
* id: 'my.custom.bop.Employee',
* singularName: 'Employee',
* pluralName: 'Employees',
* properties: [firstname, lastname, age]
* });
*
* this._entities = [employee];
* };
*
* CustomEntityProvider.prototype.getEntities = function() {
* return this._entities;
* };
*
* return CustomEntityProvider;
* });
*/
var EntityProvider = function() {
};
EntityProvider.prototype.getId = function() {
};
EntityProvider.prototype.getDataModel = function() {
};
/**
* Gets the array of {@link entity/js/api/Entity Entities} provided by this {@link bop/js/spi/entity/EntityProvider EntityProvider}.
*
* @AbcsExtension stable
* @version 17.1.1
*
* @returns {entity/js/api/Entity[]}
*/
EntityProvider.prototype.getEntities = function() {
return [];
};
return EntityProvider;
});