About Oracle ADF Entity Objects

Oracle ADF entity objects are business components that encapsulate the business model, including data, rules, and persistence behavior, for items that are used in your application. For example, entity objects can represent:

To define an entity object, see Creating an Entity Object Definition.

Entity Objects and Datasources

Entity objects map to single objects in the datasource. In the vast majority of cases, these are tables, views, synonyms, or snapshots in a database. Advanced programmers can base entity objects on objects from other datasources, such as spreadsheets, XML files, or flat text files.

When entity objects are based on database objects, columns in the database object map to single entity object attribute in the entity object. The definitions of these attributes (reflected in the entity object's XML file, as described below) reflect the properties of these columns, including data types, column constraints, and precision and scale specifications. When entity objects are based on objects from other datasources, entity object attributes map to "columns" from those objects, as defined by the programmer. For more information about entity object attributes, see the related topics list.

Entity objects handle the posting of changes to the datasource.

Because entity objects are business domain components, you do not need to develop entity objects around your application's data needs. They should instead be the most logical representation of your data. If your datasource is well-designed, their structure can be isomorphic to that of the datasource.

JDeveloper will help you both engineer entity objects from existing database tables and generate database tables from entity objects.

Entity Objects and Business Rules

Entity objects provide a hook for implementing your application's business rules, including:

Many simple business rules can be implemented declaratively and are stored in the entity object's XML file. More complex business rules require extending framework base classes.

Entity Object Definitions, Entity Object Usages, Entity Object Instances

Often, it is important to distinguish between the following:

You create entity object definitions using JDeveloper's tools. Usages of that definition can then be added to view object definitions. Entity object instances are used solely at runtime. For more information, see the related topics list.

Entity Objects, XML Files, and Java Classes

Like most business components, individual entity objects are partially defined by XML files. These files specify:

If an XML file satisfies your needs for a particular entity object, you may not need to extend any classes or write any Java code

In addition to XML files, entity object definitions comprise up to three Java classes:

For more information, see the related topics list.


About Oracle ADF Business Components
About Business Domain Components, Data Model Components, and Organizational Components
About Entity Object Attributes
About Entity Object Java Classes
Representing Database Tables
Ways to Represent Constraints
Generating a Table from an Entity Object
Implementing Business Logic
About Oracle ADF Associations
About Oracle ADF View Objects

 

 

Copyright © 1997, 2004, Oracle. All rights reserved.