Association, Composition and Aggregation in UI5, CRM, S/4HANA and C4C
UI5
UI5使用Association和Aggregation描述控件之间的关系。
Aggregation:parent和子控件在lifecycle上存在依赖关系:
When a ManagedObject is destroyed, all aggregated objects are destroyed as well and the object itself is removed from its parent. That is, aggregations won't contain destroyed objects or null/undefined.
比如UI5的转盘控件Carousel: 一旦转盘被析构,里面显示的page当然也没有继续存在的意义了,需要跟着被析构。

而Association描述了在lifecycle层面的一种soft dependency关系:
Managed associations also form a relationship between objects, but they don't define a lifecycle for the associated objects. They even can 'break' in the sense that an associated object might have been destroyed already although it is still referenced in an association.
最明显的例子就是控件和其label的关系,比如button和label:技术上来说,可以彼此分开独立存在。

CRM
CRM的Genil model存在三种类型的relation,可以在doman CRM_RELATION_KIND里查看:


区别:
Association: Link between any kind of objects. Can also be defined across components with root or access object as target. 依赖关系最为loose的一种relation,可以用来连接跨model之间的节点。
Aggregation: Binds child objects to a root object. Only access and dependent objects can be aggregated. 只适用于同一模型的节点之间的关联。
Composition: Like an aggregation, but composed child objects always exist. 特殊类型的Aggregation。目标节点的Cardinality为1或者1..n
S/4HANA
只有两种:association或者composition。Composition的含义同CRM里的aggregation,而association的含义同UI5和CRM中的association一致。

C4C
只有两种: association或者composition。C4C的这两种relation多了一个限制:relation的目标BO必须和源BO在同一个部署单元Deployment Unit,或者目标BO位于Foundation部署单元内。
Association的语法如下图:

association的multiplicity只支持[0,1]或者[1,1], 如果不显式指定,默认为[1,1].
C4C relation的一个特色是,一旦申明了一个子节点之后,系统会默认生成一个对应的composition。
下图第4行代码会自动生成一个[0,n]的从root节点到Item节点的composition。

要获取更多Jerry的原创技术文章,请关注公众号"汪子熙"或者扫描下面二维码:


Association, Composition and Aggregation in UI5, CRM, S/4HANA and C4C的更多相关文章
- JAVA类与类之间的全部关系简述+代码详解
本文转自: https://blog.csdn.net/wq6ylg08/article/details/81092056类和类之间关系包括了 is a,has a, use a三种关系(1)is a ...
- 关联,聚合和组合(复合)--Association, Aggregation and Composition
概要 Association, Aggregation and Composition are terms that represent relationships among objects. Th ...
- powerdsigner Association Multiplicity
这一篇來告诉一个不容易分辨的关系图式:Association(结合)的各种類型,除了了解它的涵义 外,也让各位可以看图說故事,知道它背后所要表达的意义. Association结合 Associati ...
- 如何将Twitter的内容导入到SAP CRM和C4C
Twitter的内容导入SAP CRM Interaction Center呼叫中心 具体步骤查看我的博客Twitter(also Facebook) is official integrated i ...
- [emacs] Drawing uml under emacs org-mode using plantUML - 类图
[emacs] Drawing uml under emacs org-mode using plantUML - 类图 // */ // ]]> [emacs] Drawing uml u ...
- 1 UML基础
学习设计模式的过程中,发现相关的作者们都会用UML类图来表示一个模式的整体脉络,这种方式确实直观明了,既能体现宏观思路.又能兼顾实现细节.真的是很妙的工具.在开始正式学习设计模式之前,有必要对UML有 ...
- UML类图关系总结
在UML类图中,常见的有以下几种关系: 泛化(Generalization) 实现(Realization) 关联(Association) 聚合(Aggregation) 组合(Compositio ...
- UML常用图的几种关系的总结
在UML的 类图中,常见的有以下几种关系: 泛化(Generalization), 实现(Realization), 关联(Association), 聚合(Aggregation), 组合(Com ...
- Understanding the RelationshipType Enumeration [AX 2012]
Understanding the RelationshipType Enumeration [AX 2012] 3 out of 3 rated this helpful - Rate this t ...
随机推荐
- HDU计算机学院大学生程序设计竞赛(2015’12)The Country List
Problem Description As the 2010 World Expo hosted by Shanghai is coming, CC is very honorable to be ...
- Jenkins自动化CI CD流水线之7--流水线自动化发布PHP项目
一.前提 环境为:lnmp PHP项目:wordpress(此处我们下载一个wordpress的源码.将其模拟为我们的代码上传到我们的git仓库) 二.配置 1)创建job 2)参数化构建 3)配置p ...
- http 和 https 的区别
参考:http://www.cnblogs.com/wqhwe/p/5407468.html HTTP:是互联网上应用最为广泛的一种网络协议,是一个客户端和服务器端请求和应答的标准(TCP),用于从W ...
- eclipse 离线安装STS插件
1.下载 eclipse Version: 2018-12 (4.10.0) 下载sts相应版本:https://spring.io/tools3/sts/all 2.安装 Help->Inst ...
- my13_mysql xtrabackup备份的时间点
备份原理 xtrabackup的备份时间点是备份结束时刻,记录在xtrabackup_binlog_info 文件中:如果后续需要通过binlog追加操作,则该时间点是起点. 备份开始后,xtrabc ...
- java——线段树 SegmentTree
应用: 区间染色 区间查询 线段树不是完全二叉树,线段树是平衡二叉树 使用数组来实现线段树:存储空间为4n 以下是使用数组实现的静态线段树: public class SegmentTree<E ...
- my.资料
领回梦丹 http://ka.gamedog.cn/card/2036517.html 1. 普陀的加点没有优点缺点之分,只有是否和你的装备般配.这里可以给一些小数据参考. 60级物理防御达到900, ...
- Python import搜索路径相关
import搜索路径 在当前目录下搜索该模块 在环境变量 PYTHONPATH 中指定的路径列表中依次搜索 在 Python 安装路径的 lib 库中搜索 查看当前的搜索路径 import sys p ...
- WPF调用Win Form
WPF是win form的下一代版本,现在越来越多的公司使用WPF.如何兼容已有的使用win form开发的应用程序呢?下面有三种方式来在WPF中调用win form. 使用WPF中的WindowsF ...
- http学习总结及思考
针对前面几章的学习,加上在学长的指导下,希望对前面知识进行简单总结. 1.在报文的7个方法中,最常用的是:Head和Post 响应头:If-Modified-Since HEAD -> 服务器返 ...