Introduction to iDempiere Development
Overview
- What you’ll learn: How to set up a complete iDempiere development environment with Eclipse IDE, clone and build the source code, run iDempiere from the IDE, and make your first code change.
- Prerequisites: Lessons 1-12 (Beginner level), Java programming fundamentals
- Estimated reading time: 30 minutes
Introduction
Up to this point in the curriculum, you have been configuring iDempiere through the Application Dictionary, callouts, and workflows — all powerful tools that do not require modifying iDempiere’s source code. But to build plugins, create custom model classes, implement complex business logic, or contribute to the core project, you need a proper development environment.
This lesson walks you through the complete setup: installing prerequisites, cloning the source, importing into Eclipse, configuring the target platform, and running iDempiere from the IDE with full debugging support.
Prerequisites
Before you begin, ensure you have the following installed on your development machine:
Java 17 JDK
iDempiere requires Java 17 (LTS). Download and install OpenJDK 17 from Eclipse Temurin or your preferred JDK distribution.
# Verify Java installation
java -version
# Expected output: openjdk version "17.x.x" ...
# Verify JAVA_HOME is set
echo $JAVA_HOME
# Should point to your JDK 17 installation directory
Eclipse IDE for RCP and RAP Developers
iDempiere is built on the Eclipse RCP (Rich Client Platform) and uses the OSGi framework extensively. You must use the Eclipse IDE for RCP and RAP Developers edition — the standard Java edition lacks the PDE (Plugin Development Environment) tools required for iDempiere development.
Download from eclipse.org/downloads/packages. Look for “Eclipse IDE for RCP and RAP Developers”.
PostgreSQL
You need a PostgreSQL database (version 14 or later) with an iDempiere database loaded. If you completed the installation lesson (Lesson 3), you already have this. For development, a local PostgreSQL instance is recommended.
Git
Git must be installed for cloning the source repository.
# Verify Git installation
git --version
# Expected: git version 2.x.x or later
Cloning the iDempiere Source
The iDempiere source code is hosted on GitHub. Clone the repository to your local machine:
# Clone the main repository
git clone https://github.com/idempiere/idempiere.git
# This creates an 'idempiere' directory with the full source
cd idempiere
# Check available branches
git branch -a
# The 'development' branch is the latest active development branch
# The 'master' branch tracks stable releases
git checkout development
The clone is approximately 1-2 GB and includes the complete project history. On a typical broadband connection, this takes a few minutes.
Importing into Eclipse
Follow these steps carefully — the import process is specific to Eclipse PDE projects:
- Launch Eclipse and select a new workspace (do not reuse an existing workspace from other projects).
- Go to File > Import > General > Existing Projects into Workspace.
- Set the Root Directory to the cloned
idempierefolder. - Eclipse will detect all projects. Ensure all projects are selected.
- Do NOT check “Copy projects into workspace” — leave the projects in their original location.
- Click Finish.
Eclipse will import approximately 60-80 projects. You will see build errors initially — this is expected because the Target Platform has not been set yet.
Setting Up the PDE Target Platform
The Target Platform defines the set of plugins (OSGi bundles) that iDempiere runs against. This is the most critical setup step and the one most commonly misconfigured.
- In the Eclipse Package Explorer, find the project
org.idempiere.p2.targetplatform. - Open the file
org.idempiere.p2.targetplatform.target. - Eclipse will open the Target Definition editor. Wait for it to finish resolving (this can take several minutes on the first run as it downloads dependencies).
- Once resolved (you should see “x plugins available”), click “Set as Active Target Platform” in the upper right corner.
- Eclipse will rebuild all projects. This takes a few minutes. Watch the Progress view (bottom right) for completion.
After the target platform is set and the build completes, most or all errors should disappear. If errors persist, try:
# From Eclipse menu:
Project > Clean > Clean All Projects
# Then wait for the rebuild to complete
Project Structure Overview
The iDempiere codebase is organized as a collection of OSGi bundles (Eclipse plugins). Understanding the key projects is essential for navigating the code:
Core Projects
- org.adempiere.base — The core business logic. Contains model classes (MOrder, MInvoice, MPayment, etc.), the persistence layer (PO class), document processing, and utility classes. This is the project you will work with most frequently.
- org.compiere.model — Generated model interfaces and X_ classes. When you use the model generator, output goes here.
- org.adempiere.base.process — Standard processes (reports, imports, document processing utilities).
Server Projects
- org.adempiere.server — Application server functionality, including the scheduler, workflow processor, and alert processor.
- org.idempiere.webservices — SOAP and REST web service endpoints.
UI Projects
- org.adempiere.ui.zk — The ZK-based web user interface. Contains all window rendering, grid views, form implementations, and UI-specific logic.
- org.adempiere.webui.theme — Theme resources (CSS, images) for the web UI.
Build and Configuration Projects
- org.idempiere.p2.targetplatform — Target Platform definition (third-party dependencies).
- org.adempiere.server.product — Product configuration for building the server.
- org.adempiere.pde — PDE customizations and build utilities.
Key Package Naming Conventions
org.compiere.model -- Core model classes (M_ classes, X_ classes)
org.compiere.process -- Standard process implementations
org.compiere.util -- Utility classes (Env, DB, CLogger, etc.)
org.compiere.acct -- Accounting posting classes
org.adempiere.model -- Extended model classes
org.adempiere.base -- Base framework extensions
org.idempiere -- iDempiere-specific additions
Running iDempiere from Eclipse
Running iDempiere from Eclipse gives you the full development experience — hot code replacement, breakpoints, variable inspection, and console output.
Server Setup
- Navigate to the
org.adempiere.server.productproject. - Find the launch configuration file:
idempiere-server.launch. - Right-click the file and select Run As > idempiere-server (or Debug As for debugging).
Before the first launch, you need to configure the database connection. Create or edit the idempiereEnv.properties file:
# Key properties for development
ADEMPIERE_DB_TYPE=PostgreSQL
ADEMPIERE_DB_SERVER=localhost
ADEMPIERE_DB_PORT=5432
ADEMPIERE_DB_NAME=idempiere
ADEMPIERE_DB_USER=adempiere
ADEMPIERE_DB_PASSWORD=adempiere
ADEMPIERE_APPS_SERVER=localhost
ADEMPIERE_WEB_PORT=8080
ADEMPIERE_SSL_PORT=8443
Verifying the Launch
Watch the Eclipse Console view for startup messages. A successful startup shows:
===== iDempiere Server Started =====
Web server started at http://0.0.0.0:8080
Open a browser and navigate to http://localhost:8080/webui/ to see the login screen.
Debugging Basics
Eclipse’s debugger is your most powerful tool for understanding iDempiere’s behavior.
Setting Breakpoints
Double-click the left margin (gutter) of any source line to set a breakpoint. When execution reaches that line, the application pauses and Eclipse switches to the Debug perspective.
Common Debugging Locations
// Break on a specific model's save logic
org.compiere.model.MOrder.beforeSave()
// Break on document processing
org.compiere.model.MOrder.completeIt()
// Break on callout execution
org.compiere.model.CalloutOrder.bPartner()
// Break on the persistence layer
org.compiere.model.PO.saveEx()
Debug Operations
- Step Over (F6): Execute the current line and move to the next line.
- Step Into (F5): Enter the method called on the current line.
- Step Return (F7): Execute until the current method returns.
- Resume (F8): Continue execution until the next breakpoint.
- Variables View: Inspect all local variables, method parameters, and object fields.
- Expressions View: Evaluate arbitrary Java expressions in the current context.
- Conditional Breakpoints: Right-click a breakpoint and add a condition (e.g.,
C_Order_ID == 1000123) so it only pauses when the condition is true.
Hot Code Replacement
When running in Debug mode, Eclipse can replace code in the running application without restarting. Make a change, save the file, and Eclipse automatically compiles and replaces the class. Limitations: you cannot add new methods, change method signatures, or add class fields via hot replacement. For structural changes, you must restart.
iDempiere Coding Conventions
When contributing code to iDempiere (or building plugins), follow these conventions:
Naming
- Model classes:
Mprefix (e.g.,MOrder,MInvoice). - Generated classes:
X_prefix (e.g.,X_C_Order). - Interfaces:
I_prefix (e.g.,I_C_Order). - Callout classes:
Calloutprefix (e.g.,CalloutOrder). - Process classes: Name describes the action (e.g.,
InvoiceGenerate).
Code Style
- Use tabs for indentation (not spaces).
- Opening braces on the same line as the statement.
- Use
StringBuilderfor string concatenation in loops. - Always use
saveEx()instead ofsave()— theExvariant throws exceptions on failure rather than silently returning false. - Use
CLoggerfor logging, notSystem.out.println().
// Correct iDempiere style
private static final CLogger log = CLogger.getCLogger(MyClass.class);
public String processIt() {
MOrder order = new MOrder(getCtx(), orderId, get_TrxName());
if (order.getGrandTotal().compareTo(Env.ZERO) <= 0) {
log.warning("Order " + order.getDocumentNo() + " has zero total");
return "Order total must be positive";
}
order.setDocStatus(MOrder.DOCSTATUS_Completed);
order.saveEx();
return null;
}
Understanding the Build System
iDempiere uses Maven with the Tycho plugin for building. Tycho integrates Maven with Eclipse PDE, enabling Maven to build OSGi bundles and Eclipse plugins.
Building from the Command Line
# Navigate to the iDempiere root directory
cd /path/to/idempiere
# Full build
mvn verify -Didempiere.target=org.idempiere.p2.targetplatform
# Skip tests for a faster build
mvn verify -DskipTests
# Build a specific module
mvn verify -pl org.adempiere.base
Key Build Files
pom.xml(root) — Parent POM defining common properties and modules.pom.xml(per project) — Module-level POM with project-specific build configuration.META-INF/MANIFEST.MF— OSGi bundle manifest defining the plugin’s identity, dependencies, and exported packages.build.properties— Eclipse PDE build configuration listing source folders and included resources.
Making Your First Code Change
Let us make a simple, safe change to verify your development environment works end-to-end.
Adding a Log Statement
- In the Package Explorer, navigate to
org.adempiere.base > src > org.compiere.model > MOrder.java. - Find the
beforeSave(boolean newRecord)method. - Add a log statement at the beginning of the method:
@Override protected boolean beforeSave(boolean newRecord) { log.info("MOrder.beforeSave called for DocumentNo=" + getDocumentNo() + " newRecord=" + newRecord); // ... rest of existing code } - Save the file (Ctrl+S). If running in Debug mode, hot code replacement applies the change immediately.
- Go to the iDempiere web UI, open a Sales Order, and save it.
- Check the Eclipse Console — you should see your log message.
Reverting Your Change
After verifying the change works, revert it so you do not accidentally commit debug logging:
# From the command line
cd /path/to/idempiere
git checkout -- org.adempiere.base/src/org/compiere/model/MOrder.java
Or in Eclipse: right-click the file and select Replace With > HEAD Revision.
Key Takeaways
- iDempiere development requires Java 17, Eclipse IDE for RCP/RAP Developers, PostgreSQL, and Git.
- The source is on GitHub — clone the repository and import all projects into Eclipse.
- The PDE Target Platform setup is critical — without it, the project will not compile.
- Key projects:
org.adempiere.base(core logic),org.adempiere.ui.zk(UI),org.adempiere.server(server). - Run iDempiere from Eclipse using the provided launch configuration for full debugging support.
- Eclipse’s debugger (breakpoints, variable inspection, hot replacement) is essential for productive development.
- The build system uses Maven with Tycho for OSGi bundle building.
- Follow iDempiere naming conventions: M_ for model classes, X_ for generated, I_ for interfaces.
What’s Next
In Lesson 17, you will dive into iDempiere’s Model Layer — the X_ and M_ class hierarchy, the PO base class, and how to write business logic using lifecycle methods like beforeSave() and afterSave(). This is where your development environment setup pays off.
繁體中文
概述
- 學習內容:如何使用 Eclipse IDE 設定完整的 iDempiere 開發環境、複製和建構原始碼、從 IDE 執行 iDempiere,以及進行您的第一次程式碼修改。
- 先修條件:第 1-12 課(初級),Java 程式設計基礎
- 預估閱讀時間:30 分鐘
簡介
到目前為止的課程中,您一直透過應用程式字典、Callout 和工作流程來配置 iDempiere——這些都是不需要修改 iDempiere 原始碼的強大工具。但要建立 Plugin、建立自訂模型類別、實現複雜的業務邏輯或為核心專案做出貢獻,您需要一個適當的開發環境。
本課將引導您完成整個設定:安裝先決條件、複製原始碼、匯入 Eclipse、配置目標平台,以及從 IDE 執行具有完整除錯支援的 iDempiere。
先決條件
開始之前,請確保您的開發機器上已安裝以下軟體:
Java 17 JDK
iDempiere 需要 Java 17(LTS)。從 Eclipse Temurin 或您偏好的 JDK 發行版下載並安裝 OpenJDK 17。
Eclipse IDE for RCP and RAP Developers
iDempiere 建立在 Eclipse RCP(Rich Client Platform)之上,並廣泛使用 OSGi 框架。您必須使用 Eclipse IDE for RCP and RAP Developers 版本——標準 Java 版本缺少 iDempiere 開發所需的 PDE(Plugin Development Environment)工具。
PostgreSQL
您需要一個已載入 iDempiere 資料庫的 PostgreSQL 資料庫(版本 14 或更高)。對於開發,建議使用本地 PostgreSQL 實例。
Git
必須安裝 Git 以複製原始碼儲存庫。
複製 iDempiere 原始碼
iDempiere 原始碼託管在 GitHub 上。將儲存庫複製到您的本地機器:
# 複製主要儲存庫
git clone https://github.com/idempiere/idempiere.git
cd idempiere
# 'development' 分支是最新的活躍開發分支
git checkout development
匯入 Eclipse
請仔細按照以下步驟操作——匯入流程是 Eclipse PDE 專案特有的:
- 啟動 Eclipse 並選擇一個新的工作區(不要重用其他專案的現有工作區)。
- 前往 File > Import > General > Existing Projects into Workspace。
- 將根目錄設定為複製的
idempiere資料夾。 - Eclipse 將檢測所有專案。確保選擇所有專案。
- 不要勾選「Copy projects into workspace」——將專案保留在原始位置。
- 點擊完成。
Eclipse 將匯入約 60-80 個專案。最初您會看到建構錯誤——這是正常的,因為尚未設定目標平台。
設定 PDE 目標平台
目標平台定義 iDempiere 執行時所依賴的 Plugin(OSGi bundle)集合。這是最關鍵的設定步驟,也是最常被錯誤配置的步驟。
- 在 Eclipse Package Explorer 中,找到專案
org.idempiere.p2.targetplatform。 - 開啟檔案
org.idempiere.p2.targetplatform.target。 - Eclipse 將開啟目標定義編輯器。等待它完成解析(首次執行時可能需要幾分鐘,因為它會下載相依性)。
- 解析完成後(您應該看到「x plugins available」),點擊右上角的「Set as Active Target Platform」。
- Eclipse 將重新建構所有專案。這需要幾分鐘。觀察進度檢視(右下角)以確認完成。
專案結構概覽
iDempiere 程式碼庫組織為一系列 OSGi bundle(Eclipse Plugin)。了解關鍵專案對於瀏覽程式碼至關重要:
- org.adempiere.base — 核心業務邏輯。包含模型類別、持久層(PO 類別)、文件處理和工具類別。
- org.adempiere.ui.zk — 基於 ZK 的 Web 使用者介面。
- org.adempiere.server — 應用程式伺服器功能,包括排程器和工作流程處理器。
- org.idempiere.p2.targetplatform — 目標平台定義(第三方相依性)。
從 Eclipse 執行 iDempiere
從 Eclipse 執行 iDempiere 為您提供完整的開發體驗——熱程式碼替換、中斷點、變數檢查和控制台輸出。
導覽至 org.adempiere.server.product 專案,找到啟動配置檔案 idempiere-server.launch,右鍵點擊並選擇 Run As > idempiere-server。
首次啟動前,您需要配置資料庫連線,建立或編輯 idempiereEnv.properties 檔案。
除錯基礎
Eclipse 的除錯器是了解 iDempiere 行為最強大的工具。
- Step Over (F6):執行當前行並移至下一行。
- Step Into (F5):進入當前行呼叫的方法。
- Step Return (F7):執行直到當前方法返回。
- Resume (F8):繼續執行直到下一個中斷點。
- Variables View:檢查所有局部變數、方法參數和物件欄位。
- 條件式中斷點:右鍵點擊中斷點並新增條件,使其僅在條件為真時暫停。
熱程式碼替換
在除錯模式下執行時,Eclipse 可以在不重新啟動的情況下替換執行中應用程式的程式碼。進行修改、儲存檔案,Eclipse 會自動編譯並替換類別。限制:您無法透過熱替換新增新方法、更改方法簽名或新增類別欄位。
iDempiere 程式碼慣例
- 模型類別:
M前綴(例如MOrder)。 - 產生的類別:
X_前綴(例如X_C_Order)。 - 介面:
I_前綴(例如I_C_Order)。 - 使用 Tab 縮排(非空格)。
- 始終使用
saveEx()而非save()。 - 使用
CLogger記錄日誌,而非System.out.println()。
了解建構系統
iDempiere 使用 Maven 搭配 Tycho Plugin 進行建構。Tycho 將 Maven 與 Eclipse PDE 整合,使 Maven 能夠建構 OSGi bundle 和 Eclipse Plugin。
進行您的第一次程式碼修改
讓我們進行一個簡單、安全的修改來驗證您的開發環境是否端到端正常運作。在 MOrder.java 的 beforeSave 方法開頭加入一個日誌語句,儲存檔案,然後在 Web UI 中儲存一筆銷售訂單來驗證。驗證後記得還原修改。
重點摘要
- iDempiere 開發需要 Java 17、Eclipse IDE for RCP/RAP Developers、PostgreSQL 和 Git。
- 原始碼在 GitHub 上——複製儲存庫並將所有專案匯入 Eclipse。
- PDE 目標平台設定至關重要——沒有它,專案將無法編譯。
- 關鍵專案:
org.adempiere.base(核心邏輯)、org.adempiere.ui.zk(UI)、org.adempiere.server(伺服器)。 - 使用提供的啟動配置從 Eclipse 執行 iDempiere 以獲得完整的除錯支援。
- Eclipse 的除錯器(中斷點、變數檢查、熱替換)對於高效開發至關重要。
- 建構系統使用 Maven 搭配 Tycho 進行 OSGi bundle 建構。
- 遵循 iDempiere 命名慣例:M_ 用於模型類別、X_ 用於產生的類別、I_ 用於介面。
下一步
在第 17 課中,您將深入了解 iDempiere 的模型層——X_ 和 M_ 類別階層、PO 基礎類別,以及如何使用 beforeSave() 和 afterSave() 等生命週期方法撰寫業務邏輯。這是您的開發環境設定成果的體現。
日本語
概要
- 学習内容:Eclipse IDEを使用した完全なiDempiere開発環境の構築方法、ソースコードのクローンとビルド、IDEからのiDempiere実行、最初のコード変更の実施。
- 前提条件:レッスン1〜12(初級レベル)、Javaプログラミングの基礎
- 推定読了時間:30分
はじめに
これまでのカリキュラムでは、アプリケーション辞書、コールアウト、ワークフローを通じてiDempiereを設定してきました——すべてiDempiereのソースコードを変更する必要のない強力なツールです。しかし、プラグインの構築、カスタムモデルクラスの作成、複雑なビジネスロジックの実装、コアプロジェクトへの貢献には、適切な開発環境が必要です。
このレッスンでは、完全なセットアップを説明します:前提条件のインストール、ソースのクローン、Eclipseへのインポート、ターゲットプラットフォームの設定、完全なデバッグサポートを備えたIDEからのiDempiere実行です。
前提条件
Java 17 JDK
iDempiereにはJava 17(LTS)が必要です。Eclipse Temurinまたはお好みのJDKディストリビューションからOpenJDK 17をダウンロードしてインストールしてください。
Eclipse IDE for RCP and RAP Developers
iDempiereはEclipse RCP(Rich Client Platform)上に構築され、OSGiフレームワークを広く使用しています。Eclipse IDE for RCP and RAP Developersエディションを使用する必要があります——標準のJavaエディションにはiDempiere開発に必要なPDE(Plugin Development Environment)ツールがありません。
PostgreSQL
iDempiereデータベースがロードされたPostgreSQLデータベース(バージョン14以降)が必要です。開発にはローカルPostgreSQLインスタンスを推奨します。
Git
ソースリポジトリのクローンにGitのインストールが必要です。
iDempiereソースのクローン
iDempiereのソースコードはGitHubでホストされています。リポジトリをローカルマシンにクローンします:
git clone https://github.com/idempiere/idempiere.git
cd idempiere
git checkout development
Eclipseへのインポート
- Eclipseを起動し、新しいワークスペースを選択します。
- File > Import > General > Existing Projects into Workspaceに移動します。
- ルートディレクトリをクローンした
idempiereフォルダに設定します。 - すべてのプロジェクトが選択されていることを確認します。
- 「Copy projects into workspace」にチェックを入れないでください。
- Finishをクリックします。
Eclipseは約60〜80のプロジェクトをインポートします。最初はビルドエラーが表示されます——ターゲットプラットフォームがまだ設定されていないため、これは正常です。
PDEターゲットプラットフォームの設定
ターゲットプラットフォームはiDempiereが動作するプラグイン(OSGiバンドル)のセットを定義します。これは最も重要な設定ステップです。
- Eclipse Package Explorerで
org.idempiere.p2.targetplatformプロジェクトを見つけます。 org.idempiere.p2.targetplatform.targetファイルを開きます。- 解決が完了するのを待ち(初回は数分かかる場合があります)、右上の「Set as Active Target Platform」をクリックします。
- Eclipseがすべてのプロジェクトを再ビルドします。
プロジェクト構造の概要
- org.adempiere.base — コアビジネスロジック。モデルクラス、永続化レイヤー(POクラス)、ドキュメント処理、ユーティリティクラスを含む。
- org.adempiere.ui.zk — ZKベースのWebユーザーインターフェース。
- org.adempiere.server — アプリケーションサーバー機能。スケジューラ、ワークフロープロセッサを含む。
- org.idempiere.p2.targetplatform — ターゲットプラットフォーム定義。
EclipseからのiDempiere実行
EclipseからiDempiereを実行すると、ホットコード置換、ブレークポイント、変数検査、コンソール出力を含む完全な開発体験が得られます。org.adempiere.server.productプロジェクトのidempiere-server.launchを使用して起動します。
デバッグの基本
- Step Over (F6):現在の行を実行して次の行に移動。
- Step Into (F5):現在の行で呼び出されるメソッドに入る。
- Step Return (F7):現在のメソッドが返るまで実行。
- Resume (F8):次のブレークポイントまで実行を継続。
- Variables View:すべてのローカル変数を検査。
- 条件付きブレークポイント:条件がtrueの場合のみ一時停止。
ホットコード置換
デバッグモードでの実行中、Eclipseは再起動なしで実行中のアプリケーションのコードを置換できます。制限:新しいメソッドの追加、メソッドシグネチャの変更、クラスフィールドの追加はホット置換では不可。
iDempiereのコーディング規約
- モデルクラス:
Mプレフィックス(例:MOrder) - 生成クラス:
X_プレフィックス(例:X_C_Order) - インターフェース:
I_プレフィックス(例:I_C_Order) - インデントにはタブを使用(スペースではなく)
- 常に
saveEx()を使用(save()ではなく) - ログには
CLoggerを使用
ビルドシステムの理解
iDempiereはビルドにMavenとTychoプラグインを使用します。TychoはMavenとEclipse PDEを統合し、MavenがOSGiバンドルとEclipseプラグインをビルドできるようにします。
最初のコード変更
開発環境がエンドツーエンドで動作することを確認するために、シンプルで安全な変更を行います。MOrder.javaのbeforeSaveメソッドの先頭にログステートメントを追加し、Web UIで販売注文を保存して確認します。確認後、変更を元に戻してください。
重要ポイント
- iDempiere開発にはJava 17、Eclipse IDE for RCP/RAP Developers、PostgreSQL、Gitが必要。
- ソースはGitHubにあり、リポジトリをクローンしてすべてのプロジェクトをEclipseにインポート。
- PDEターゲットプラットフォームの設定が重要——なければプロジェクトはコンパイルできない。
- 主要プロジェクト:
org.adempiere.base(コアロジック)、org.adempiere.ui.zk(UI)、org.adempiere.server(サーバー)。 - 完全なデバッグサポートのため、提供されたランチ設定を使用してEclipseからiDempiereを実行。
- Eclipseのデバッガ(ブレークポイント、変数検査、ホット置換)は生産的な開発に不可欠。
- ビルドシステムはMaven + TychoでOSGiバンドルをビルド。
- iDempiereの命名規則に従う:M_はモデルクラス、X_は生成クラス、I_はインターフェース。
次のステップ
レッスン17では、iDempiereのモデルレイヤーに深く潜ります——X_およびM_クラス階層、PO基底クラス、beforeSave()やafterSave()などのライフサイクルメソッドを使用したビジネスロジックの書き方です。ここで開発環境のセットアップが活きてきます。