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 ...
随机推荐
- MATLAB教程
基本操作:https://www.w3cschool.cn/matlab/ MATLAB2018a下载安装教程http://www.zhanshaoyi.com/6938.html
- day_08 文件操作
常用模式解释 open表示打开一个文件 f 变量, 操控XXX.txt文件的句柄 r:只读 w:只写 a:追加写入 b:byte,这种模式下,encoding不能用utf-8字符集 1. 文件的基本操 ...
- PV并发UV
netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'返回结果:SYN_RECV 2 (SYN连接请求收到2个 等待确 ...
- Android NDK开发 Jni中打日志LOG(二)
HelloJni.c文件中,加入头文件和函数声明.最终文件如下: #include <jni.h> #include <string.h> #include<androi ...
- python3 FTP简单实现文件下载(含中文乱码问题)
from ftplib import FTP def ftp_down(HOST,romatepath,filename,localpath): user=***** password=***** f ...
- maya安装不了
AUTODESK系列软件着实令人头疼,安装失败之后不能完全卸载!!!(比如maya,cad,3dsmax等).有时手动删除注册表重装之后还是会出现各种问题,每个版本的C++Runtime和.NET f ...
- Linux下判断磁盘是SSD还是HDD的几种方法
环境介绍 Fedora release 25 (Twenty Five) 判断方法 方法一 判断cat /sys/block/*/queue/rotational的返回值(其中*为你的硬盘设备名称,例 ...
- Java基础13-数组算法
1.数组的复制 //复制算法,将arr1数组的值复制给arr2数组 import java.util.Arrays; public class Test1{ public static void ma ...
- Murano Weekly Meeting 2016.06.07
Meeting time: 2016.June.7 1:00~2:00 Chairperson: Kirill Zaitsev, from Mirantis Meeting summary: 1.A ...
- (转)Linux系统排查4——网络篇
原文:http://www.cnblogs.com/Security-Darren/p/4700387.html 用于排查Linux系统的网络故障. 网络排查一般是有一定的思路和顺序的,其实排查的思路 ...