Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g (10.1.3.1.0) Part Number B25947-01 |
|
|
View PDF |
An entity object is the ADF Business Components component that represents a row in a database table and simplifies modifying its data. Importantly, it allows you to encapsulate domain business logic for those rows to ensure that your business policies and rules are consistently validated. By the end of this chapter, you'll understand the concepts shown in Figure 6-1:
You define an entity object by specifying the database table whose rows it will represent.
You can associate an entity object with others to reflect relationships between underlying database tables.
At runtime, entity rows are managed by a related entity definition object.
Each entity rows is identified by a related row key.
You retrieve and modify entity rows in the context of an application module that provides the database transaction.
When your application module creates, modifies, or removes entity objects and commits the transaction, changes are saved automatically. When you need to work together with a ServiceRequest
and the User
who created it, or the ServiceHistory
entries it logically contains, then associations between entities simplify the task. Entity objects support numerous declarative business logic features to enforce the validity of your data as well. As you'll see in more detail in later chapters, you will typically complement declarative validation with additional custom application logic and business rules to cleanly encapsulate a maximum amount of domain business logic into each entity object. Your associated set of entity objects forms a reusable business domain layer that you can exploit in multiple applications.
Note: To experiment with a working version of the examples in this chapter, download theDevGuideExamples workspace from the Example Downloads page at http://otn.oracle.com/documentation/jdev/b25947_01/ and see the BusinessLayerWithEntityObjects project. |