Hybris DDIC type and its counterpart model class
在ABAP里,我们在SE11里面创建data type或者transparent table, 然后在ABAP代码里可以直接消费这些DDIC object.
而Hybris是基于Java的,大家知道在Java里除了primitive type如int, boolean这些一样,万物皆对象. 数据类型是一个Java Class,而这些数据类型具体的item(transaction data)就是Java Class的一个个实例:
every object stored in SAP Hybris Commerce is an instance of a type.
例子:
我在catalog这个extension里定义了一个data type catalog, 里面有个字段id:
那么用ant clean all build之后,会自动在这个folder下面生成对应的Model class, 遵循naming convention Model.java:
生成的Model class - 这种套路在ABAP里随处可见了,比如我们在SEGW里做Odata model,然后直接激活生成DPC MPC.
因为我在xml里指定了read=true, write=true, 因此会生成对应的getter和setter方法:
用法很简单,在Java code里拿到model instance,直接call setter / getter:
本文来自云栖社区合作伙伴“汪子熙”,了解相关信息可以关注微信公众号"汪子熙"。

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
How to debug Interaction center inbox workflow WS14000164
(1) sent one mail to IC inbox via outlook: (2) go to SWEL to check if there is one entry for the mail you just sent (3) go to tcode SWI1, you will find two entries for the mail you just sent, choose entry with Status = READY. set a breakpoint in the method below, then execute the selected entry. (4) in debugger change the content of ls_rfc_dest-rfcdest to "NONE". (5) go to SM58, you will find one entry for background execution in step4. if you could not find any entry, please check whether you h...
- 下一篇
escape in ABAP and JavaScript
ABAP IF_HTTP_UTILITY~ESCAPE_URL JavaScript 开源的sanitizer库,Google搞的。 https://www.npmjs.com/package/sanitizersanitizer.escape('your dirty string');用于C4C: 在Java里使用这个JS library: public class CajaSanitiser { private final ScriptEngine engine; private final Bindings bindings; public CajaSanitiser() throws IOException, ScriptException { this.engine = new ScriptEngineManager().getEngineByName("js"); this.bindings = engine.getBindings(ScriptContext.ENGINE_SCOPE); String scriptName = "com/google/caja/plugi...
相关文章
文章评论
共有0条评论来说两句吧...
文章二维码
点击排行
推荐阅读
最新文章
- SpringBoot2更换Tomcat为Jetty,小型站点的福音
- CentOS8安装MyCat,轻松搞定数据库的读写分离、垂直分库、水平分库
- CentOS6,CentOS7官方镜像安装Oracle11G
- Jdk安装(Linux,MacOS,Windows),包含三大操作系统的最全安装
- SpringBoot2整合MyBatis,连接MySql数据库做增删改查操作
- SpringBoot2全家桶,快速入门学习开发网站教程
- SpringBoot2编写第一个Controller,响应你的http请求并返回结果
- CentOS7安装Docker,走上虚拟化容器引擎之路
- CentOS8,CentOS7,CentOS6编译安装Redis5.0.7
- CentOS8编译安装MySQL8.0.19