@ima/plugin-rest-client
Version:
Generic REST API client plugin for the IMA application framework.
23 lines (22 loc) • 769 B
JavaScript
/**
* Decorator for setting the static {@code idFieldName} property of an entity
* class, which specifies the name of the field that contains the entity's
* primary key (ID).
*
* @param {string} idParameterName The name of the field containing the
* entity's ID.
* @returns {function(function(
* new: AbstractEntity,
* RestClient,
* Object<string, *>,
* ?AbstractEntity=
* ))} Callback that sets the name of the field containing the entity's
* ID.
*/ export default ((idParameterName)=>{
return (classConstructor)=>{
Object.defineProperty(classConstructor, 'idFieldName', {
value: idParameterName
});
};
});
//# sourceMappingURL=idFieldName.js.map