Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to implement DAO in SAP Hybris and ABAP Netweaver

Shulou Source: shulou.com Published: 2022-05-31 16:03:08 10月01日 Update

This article mainly explains "how to realize DAO in SAP Hybris and ABAP Netweaver". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "how to realize DAO in SAP Hybris and ABAP Netweaver"!

DAO is defined in Hybris:

A DAO (Data Access Object) is an interface to the storage back end system. DAOs store and retrieve objects. You use DAOs to save, remove, and find models. DAOs are the place to put SQL or FlexibleSearch statements and nowhere else. This is to ensure further decoupling from the underlying storage facility. DAOs interact with services via models and with the database via FlexibleSearch and SQL statements.

Indeed, this is a common concept, which encapsulates CRUD of the persistence layer to achieve decoupling of the persistence layer implementation by the previous layer.

Take a random DAO implementation of ABAP:

The super class of all DAO implementations in Hybris is the hybris standard DAO framework, defined in the following namespace. The discussion is all about a DAO as an interface definition operation

Another DAO that starts with default provides a default implementation: spell SQL and then call flexibile search.

Flexible search is equivalent to ABAP OPEN SQL, decoupling DB access from the specific DB provider.

Which DAO implementation is used specifically at runtime is injected into the Spring configuration file:

At this point, I believe everyone has a deeper understanding of "how to realize DAO in SAP Hybris and ABAP Netweaver". Let's do it in practice! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Tags: Content decoupling learning practical deeper interested practical practical that is the beginning simple operation files methods is in more friends standards frameworks websites this is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MySQL Redmi vpn Apple