Gateway architecture - HxGN EAM - 12.0 - Customization & Programming - Hexagon

HxGN EAM Architecture and Server Management

Language
English
Product
HxGN EAM
Search by Category
Customization & Programming
HxGN EAM Version
12

Gateway architecture_Figure1_Database

Figure 1. High-level design of the persistence layer.

Design of the persistent layer is presented on the preceding diagram (Figure 1).

DAO. DAO consists of the set of classes generated from a given DB schema and supplementary (optional) configuration files. This represents one of the main advantages of our approach – for schema of 700 tables code generation produces approximately 20MB of the source code nobody must maintain. Up to date with database schema Java code is generated upon request. These classes provide constrain verification and data access functionality.

Generated classes produced directly from the schema provide only simple (one-to-one) mapping between DB tables and Java classes. To generate complex DAO Java classes, special customization file is used. These files include definitions of the joins between multiple tables, stored procedure calls, etc.

DAO also provide seamless support for the views, LOBs, and other database objects. From developers’ prospective, DAO is the full representation of the underlying DB schema.

DAL is responsible for the communication with the DB. It hides from developers, the complexity of the DB access environment. It also takes care about presenting developers with a uniform model of the abstract database, carefully hiding discrepancies in behavior of the Oracle (different versions), Microsoft SQL, and DB2 databases.

One of the main advantages of using DAL is the ability to implement plug-in-based extensions. As shown on the diagram below DAL can be used to implement data layer auditing (who changed what and when), additional business rules restrictions (introducing constraints one level above the DB schema), and search (any changes in the data can be incrementally introduced to the search engine indexes), etc.

For performance and backward compatibility reasons, HxGN EAM relies on a set of stored procedures and triggers. DAL allows accessing this functionality in a uniform manner, treating stored procedures as an object of the same nature as tables and views.

Due to the light-weight nature of the DAL there is no measurable performance overhead compare to the standard JDBC.

DAL framework is used in conjunction with standard Entity Beans. With Entity Beans product can reach higher levels of scalability by utilizing data caching mechanism where and when it is possible using advanced caching features available in all supported application servers.