SAP Spartacus B2B模块 State的设计原理
2023-09-14 09:02:54 时间
Spartacus stores everything related to Organization in entities and lists of IDs separately. Associated data for a subsection is stored with its own feature, but for specific views, Spartacus uses a combination of ID and query parameters to store a list of IDs and other information.
export interface Management<Type> extends StateUtils.EntityListState<Type> {}
展开:
Management<UserGroup>
相当于
StateUtils.EntityListState<UserGroup>:
export interface EntityListState<Type> {
list: EntityLoaderState<ListModel>;
entities: EntityLoaderState<Type>;
}
相当于:
EntityListState<UserGroup>{
list: EntityLoaderState<ListModel>;
entity: EntityLoaderState<UserGroup>;
}
export type EntityLoaderState = EntityState<LoaderState>;
相当于:
EntityListState<UserGroup>{
list: EntityState<LoaderState<ListModel>;
entity: EntityState<LoaderState<UserGroup>;
}
相当于:
EntityListState<UserGroup>{
list: EntityState<loading, error, success, value: ListModel>;
entity: EntityState<loading, error, success, value: UserGroup>;
}
相当于:
EntityListState<UserGroup>{
list: EntityState<loading, error, success, value: ListModel>;
entity: EntityState<loading, error, success, value: UserGroup>;
}
相当于:
EntityListState<UserGroup>{
list: entities: {
[id: string]: loading, error, success, value: ListModel
}
entity: entities: {
[id: string]: loading, error, success, value: UserGroup
};
}
例子:
- entities stores real user group objects, which are key mapped to status flags and values
- list stores a list of user groups IDs for specified pages, with keys based on query parameters, such as pagination and sorts
- customers stores IDs for a subsection, with keys based on the ID of the user group and query parameters
- permisions stores IDs for a subsection, with keys based on the ID of the user group and query parameters
- pageSize=2147483647 indicates that Spartacus fetches all possible items, up to the maximum safe Java integer
更多Jerry的原创文章,尽在:“汪子熙”:
相关文章
- SAP UI5 sap.ui.layout.Grid 控件宽度百分比的设置原理
- SAP 之SD模块常用权限检查
- SAP OData 框架里的缓存(Cache)设计专题讲座试读版
- SAP软件MDG模块之License的度量方式
- SAP UI5 sap.m.Table Manual Pop-In Mode 概述
- 关于 SAP UI5 应用 render2 实例异步创建的编码实现
- SAP UI5 里 FlexBox 控件使用的一个例子
- SAP Fiori Launchpad url 参数 sap-app-origin-hint 的含义
- SAP ABAP 报表几个事件的先后执行顺序和作用
- Oracle购买SAP: 开启新数据时代(oracle收购sap)
- LIST-PROCESSING用法 ABAP任意时刻进行List输出_SAP详解编程语言
- SAP 物料在启用序列号管理或者不启用序列号管理之间快速切换详解编程语言
- SAP 库存盘点 步骤–(详细)详解编程语言
- SAP S4 BP事务代码的业务伙伴和供应商,客户之间的表关系详解编程语言
- SAP 甘特图详解编程语言
- sap中debug修改表内容详解编程语言
- SAP监控常用TCODE详解编程语言
- Oracle与SAP在仓储领域的联姻(仓库oracle和sap)
- 系统Oracle公司收购SAP系统开启新的商业时代(Oracle公司sap)
- Oracle从SAP抽取数据的简单方法(oracle从sap抽数)
- Oracle和SAP技术比较优势和劣势(oracle与sap比照)
- Oracle和SAP教程一步一步学习(oracle sap教程)