Oracle Business Components for Java Glossary

A B C D E F H I J M N O P Q R S T U V W X

A

Alias attribute setting

This setting appears in the Attribute Settings page of the View Object Wizard and Editor and in the Attribute Editor. For a view object attribute, the alias becomes part of the view object's SQL statement when it is different from the attribute name (the default); for example, if you enter myEname as the alias for the Ename attribute, the SQL statement will contain the clause Emp.Ename as myEname. An alias is useful if you have two attribute names that are the same, such as the primary and foreign keys in a join, and you need to make their names unique.

application module

The business logic tier has one or more application modules that the other tiers — clients and the database — interact with. An application module performs a specific application task, for example, handling online orders or processing salary increases. An application module has these main characteristics:

When programming your business logic tier, business logic is placed at different levels to make business components easily reusable:

An application module lets you gather data tailored to a client interface (such as a form), so data can be retrieved in one network roundtrip instead of multiple trips. You can also perform calculations in the business logic tier through remotely accessible methods, reducing client overhead. For bulk operations on application data, you can perform the operation in the business logic tier without downloading all of the data to the client; changes to the data the client is currently viewing is automatically synchronized.

To create and edit an application module at design time, use the Application Module Wizard and Editor. You can also create a default application module by using the Business Components Project Wizard and Package Wizard.

At runtime, a client creates an instance of an application module for its use. It can create an instance of an application module you created at design time, or an instance of the base application module class, called a generic application module. You can use a generic application module when you want a container for dynamically created view objects, view links, and application modules. For example, if you have a complex application with a client menu containing many tasks, you might decide to create a generic application module that instantiates application modules as needed, based on the menu choice, within the same transaction.

A client can use application module instances in a pool. For example, in the case of a web application, you may have 1,000 users but you know that only 100 will be using a certain application module at one time. So you keep 100 application module instances in a pool. When a client needs an application module instance, it takes a free one from the pool and releases it to the pool after either committing or rolling back the transaction. Because the instance is precreated, end users are saved the time it takes to instantiate the application module when they want to perform a task. Typically, web-based JSP clients use pools.

application module class

A Java class extending directly or indirectly from oracle.jbo.server.ApplicationModuleImpl. The Application Module Wizard, Business Components Project Wizard, or Package Wizard can generate this class. You can add custom code to the source file, such as methods specific to the application module task but not appropriate to place in a view object or entity object class.

You can optionally specify that this class extend from a custom class (which must directly or indirectly extend the ApplicationModuleImpl class and be in the project classpath); for example, you might do this if you want to reuse code that's already been written or if your organization decides to customize the business components framework to meet specific needs.

Application Module Wizard and Editor

These tools let you create and edit application modules. You can also create a default application module by using the Business Components Project Wizard and Package Wizard.

While the business components project is open, to create an application module with the Application Module Wizard either:

To edit an application module, in the Workspace view of the Navigator, right-click the application module and choose Edit module.

When creating an application module, the wizard lets you specify the following information, listed by panel:

When editing an application module, the editor lets you specify the following information, in addition to the previous panels (except for the Name panel):

association

Defines a relationship between two entity objects based on common attributes. The relationship can be one-to-one or one-to-many; you can use two one-to-many associations to implement a many-to-many relationship. The association allows entity objects to access the data of other entity objects through a persistent reference. Although the same type of relationship can also exist at the table level through a foreign-key relationship or object REF, an entity object only needs an association to access the data of another entity object. You can create associations regardless of whether the database has the corresponding referential integrity constraints.

An example of a relationship is a one-to-many association between departments and employees; they might have a relationship where the Dept entity object has a Deptno attribute that is related to the DeptNo attribute of the Emp entity object.

You can define and edit associations in the Association Wizard and Editor. You also can generate default associations, based on referential integrity constraints in existing tables (reverse generation), by using the Business Components Project Wizard and Package Wizard. For forward generation, creating associations can optionally add foreign-key constraints to the tables you generate. If you add referential integrity constraints to tables after you've already generated entity objects, you can simply go into the Entity Object Editor and click Finish to create the new association.

Through optional association accessors in the entity objects, you can access data on the other side of the association. For example, inside the Dept entity object, you could call the getEmps method and retrieve a row set of Emp entity objects that reflect the employees working in the current department; the next time you call getEmps, it returns the same row set. Your code can traverse associations in either direction (master to detail, and detail to master). An entity object can traverse multiple associations to get the data it needs.

An association can be a composition, where the source entity object "owns" the destination entity object: no destination entity object can be created without the owning entity object existing first.

A business component association is an implementation of the UML association concept.

Association Wizard and Editor

These tools let you create and edit associations. You can also create default associations, based on referential integrity constraints in existing tables (reverse generation), by using the Business Components Project Wizard and Package Wizard.

For forward generation, creating associations can optionally add relationships to the tables you generate; for example, you might want other applications (that don't use Business Components for Java) to have access to the same relationships. You create tables from entity objects by using the Create Database Objects Tool.

While the business components project is open, to create an association with the Association Wizard either:

To edit an association, in the Workspace view of the Navigator, right-click the association and choose Edit association.

When creating an association, the wizard lets you specify the following information, listed by panel:

When editing an association, the editor lets you specify the same information, except it excludes the Name panel.

If you add referential integrity constraints to tables after you've already generated entity objects for them, you can simply go into the Entity Object Editor and click Finish to create the new associations.

attribute

A characteristic of an entity object or view object, implemented as a JavaBean property of the object class. An attribute can correspond to a database column, or be independent of a column. There are five kinds of attributes:

Attribute kind

Defined where?

Value derived from a database query?

Persisted in the database?

persistent

entity or view object level

yes

yes (the value outlives the class that created it)

transient

entity or view object level

no

no

entity-derived

view object level

no

no

SQL-derived

view object level

yes

no

dynamic

view object level, at runtime

no

no

Entity objects can have the following kinds of attributes:

When you first create an entity object using reverse generation, a persistent entity attribute is created for each table column. After, if you change the table, you need to manually change the attribute.

View objects can have the following kinds of attributes:

The value of a SQL-derived attribute is the result of a SQL statement. For example, a YearsOfService attribute might be the difference between an employee's hire date in the database and the current date. Alternatively, you could create a transient attribute and write code to perform a calculation in a Java file to set its value. In general, using SQL-derived attributes is more efficient than performing data-intensive calculations in Java.

In Business Components for Java, the term attribute is based on the UML definition, not the XML definition. In UML, an attribute is a named property of a class that describes a range of values that instances of that class might hold.

Attribute Editor

The Attribute Editor lets you edit entity and view attributes. To access the editor, in the Workspace view of the Navigator, select an entity object or view object, then right-click an attribute in the Structure pane and choose Edit attribute. The Attribute Editor lets you specify properties at the attribute level.

When editing an attribute, the wizard lets you specify the following information, listed by panel:

attribute settings

Attributes can have the following settings. For entity object attributes, the settings can affect forward generation or the settings can be derived from an existing table (reverse generation).

Attribute Setting

Forward Generation

Reverse Generation

Persistent Attribute
(entity level)

Transient Attribute
(entity level)

Persistent Attribute (view level)

Transient Attribute
(view level)

SQL-Derived Attribute
(view level)

Entity-Derived Attribute
(view level)

Attribute Name

N/A

Default based on column name; you can change it to any Java identifier name.

Required

Required

Default based on entity attribute name

Required

Required

Default based on entity attribute name

Attribute Type

N/A

Default based on column data type; you can choose another type in the list.

Required

Required

Not modifiable; uses entity attribute setting

Required

Required

Not modifiable; uses entity attribute setting

Default Value

N/A

N/A

Optional

Optional

N/A

N/A

N/A

N/A

Primary Key

Becomes the table's primary key, or part of it if you specify multiple primary keys for a table (a composite key)

From the table; it must match the table.

Selectable

Selectable, but you should leave it deselected in most cases

N/A (the entity attribute setting applies)

N/A

N/A

N/A (the entity attribute setting applies)

Mandatory

Becomes a mandatory column in the table (a NOT NULL constraint is generated for that column in the table).

From the table; this value must match the table, or you might get problematic runtime behavior or an exception.

Selectable

Selectable

N/A (the entity attribute setting applies)

N/A

N/A

N/A (the entity attribute setting applies)

Persistent

Only persistent attributes are added to the table.

All attributes derived from the table are persistent; if you change it, this column does not get populated through the business components framework.

Selected

Deselected

N/A (the entity attribute setting applies)

N/A

N/A

N/A (the entity attribute setting applies)

Selected in Query

N/A

N/A

N/A

N/A

When selected, this attribute appears in the view object's SQL Select statement.

When selected, this attribute appears in the view object's SQL Select statement.

When selected, this attribute appears in the view object's SQL Select statement.

When selected, this attribute appears in the view object's SQL Select statement.

Updateable

N/A

N/A

Selectable

Selectable

Based on entity attribute setting; can make setting more restrictive.

Selectable

Selectable

Based on entity attribute setting; can make setting more restrictive.

Refresh After

N/A

N/A except when the java.sql.type for this attribute is CHAR, then all Refresh After checkboxes are selected.

Selectable

N/A

N/A (the entity attribute setting applies)

N/A

N/A

N/A

Database Column Name

Becomes the table's column name

From the table; it must match the table.

Required; it must match the table.

N/A

N/A (the entity attribute setting applies)

N/A

N/A

N/A

Column Type

Becomes the table's column data type

From the table; it must match the table.

Required; it must match the table.

N/A

N/A (the entity attribute setting applies)

N/A

N/A

N/A

Queriable

N/A

N/A

Selectable

N/A

Selectable

N/A

Selectable

N/A

Unique

If selected, the column has a unique constraint.

From the table; it must match the table.

Selectable

N/A

N/A (the entity attribute setting applies)

N/A

N/A

N/A

Change Indicator

N/A

N/A

Selectable

N/A

N/A

N/A

N/A

N/A

Alias

N/A

N/A

N/A

N/A

Default based on entity attribute name; optional, but can use to prevent name conflicts

Optional

Optional, can use to prevent name conflicts

Optional

Expression

N/A

N/A

N/A

N/A

N/A

N/A

Required

Optional

 

B

business component

An application-specific component derived from the business components framework:

It is implemented as an XML metadata file and possibly one or more Java files.

The XML file stores metadata: the descriptive information about features and settings of an application that you can declare with the Business Components for Java wizards and editors during design time. Some examples of metadata are names and types of attributes, a SQL query, and validation rules. The Java file(s) store the component’s custom code, which implements application-specific behavior. Information that is descriptive in nature is stored as XML while programmatic information is in Java.

Business components are organized into a standard Java package structure. For example, if a view object named DeptView is in the package MyDept, then the MyDept directory would contain the files DeptView.xml and DeptViewImpl.java. You specify the package while creating a component in a wizard and it places the files in the correct locations for you.

The XML description might have:

<ViewObject
Name="DeptView"
...
ComponentClass="MyDept.DeptViewImpl">

The Java code might have:

package MyDept;
...
public class DeptViewImpl extends
oracle.jbo.server.ViewObjectImpl {
...
}

Business Components for Java

A programming framework, implemented in Java and XML, that enables productive development, deployment, and flexible customization of multi-tier, database-savvy applications from reusable business components. These three-tier applications are made of a client, a business logic tier containing the business logic and database views, and a database server containing tables with the data the application uses. You can use the Business Components for Java wizards and editors to build the business logic tier based on your specifications; you can create both Java and JSP clients using the JDeveloper development environment; Oracle 8i or Oracle 8i Lite provides the database server. Because business rules, views, and custom code are stored in a separate tier, clients can be "thin" so they are easier to install and maintain: changes in the business logic tier often require no modification to the clients that use it.

The business logic tier is made of one or more application modules that contain view objects, representing views of data and optionally including calculations. View objects can use entity objects, representing business entities and mapping to database tables, to enforce business logic. View links represent master-detail relationships between view objects and are also contained in an application module; associations represent bidirectional relationships between entity objects. These modular components are easy to customize, maintain, and reuse in other applications. The component-based framework handles many repetitive coding tasks, including master-detail coordination, locking, and transaction management, including changes in the business logic tier’s data cache and posting changes to the database.

By using the Business Components for Java design-time wizards and editors, you can build business logic tiers by defining the characteristics of components: their attributes, relationships, and business rules. Business Components for Java generates Java source code and XML metadata to implement the behavior you have specified. Because the code inherits from a framework, the Java source files are concise and do not contain large amounts of generated code, so it's easy to see where to add your custom code. You can use JDeveloper to add the Java code to enhance or change the behavior, and easily test the application services, independently of the deployment platform. Business Components for Java then helps you deploy application modules (without modification) to an Oracle 8i JServer environment as Oracle 8i CORBA server objects (physical two-tier), Visibroker CORBA server objects (physical three-tier), OAS EJB session beans (physical three-tier), or Oracle 8i EJB session beans (physical two-tier), or in local mode (physical one- or two-tier).

Business Components Project Wizard and Editor

This wizard appears automatically after creating a business components project in the Project Wizard. Alternatively, you can choose Wizards | Business Components while a project is selected. The wizard helps you specify

You can also create and edit entity objects, associations, view objects, and view links by using the Entity Object Wizard, Association Wizard, View Object Wizard, and View Link Wizard.

To edit an existing business components project, right-click a business components project and choose Edit project to access the Business Components Project Editor. It lets you view and specify connections, specify whether to generate Java and XML code or just XML code, and view and specify registered validation rules. A few benefits of generating Java code are that you have access to strongly typed accessors instead of just having to use the generic getAttribute and setAttribute methods that return an object, and you can write code in the setter method.

If you select a business components project in the Navigator and choose Wizards | Business Components, the wizard that appears is called the Package Wizard; it provides the same functionality as the Business Components Project Wizard, except omits the Connections panel.

business logic

Business logic includes validation logic, default value logic, deletion logic, and calculations, which you should implement at the entity object level. Some examples of business logic are tracking why a customer returned a product, or bidding rules between potential suppliers to choose the best deal.

business logic tier

A basic business logic tier contains one or more application modules that provide access to view objects and view links, which in turn rely on entity objects and associations. You can test your business logic tier in the Tester.

 

C

cardinality setting

Helps define the relationship between objects by setting the minimum and maximum number of members that may participate in an association:

Change Indicator attribute setting

This setting appears in the Attribute Settings page of the Entity Object Wizard and Editor and in the Attribute Editor. For a persistent entity object attribute, selecting this setting means that the attribute is used to determine whether any persistent attribute in the entity object has changed. The first time the user changes the value of an attribute in a row, the business logic tier attempts to lock the row (pessimistic locking mode) or tries to commit (optimistic locking mode); at this time, it checks whether the data values in its cache match the database. The Change Indicator attribute setting determines whether the business logic tier checks a single attribute or multiple attributes, which involves more overhead. So, a change in the attribute value between when the data is first brought into the entity object instance in the cache and when the data is first modified is used to indicate that the entire row has been changed by another user. Only one attribute in an entity object can have this setting. Often, the attribute is a time stamp column or a sequence number.

client

A software application that requests the service, data, or processing of another application, which can be on a local or remote computer. See also thin client.

composition

An association in which a parent entity object "owns" a child entity object: the parent object is a container for one or more child objects. If a child entity object is modified, the child entity object is validated; in addition, this relationship triggers validation of the parent entity object.

For inserts, updates, and deletes, the child entity object is considered part of the parent entity object. A parent entity object containing valid child entity objects cannot be deleted until all of the contained child entity objects are deleted. When attempting to change a child entity object, the business logic tier attempts to lock the parent entity object; the owning parent entity object must be successfully locked or the change will not be allowed. For example, if you make an airline reservation, you cannot reserve a seat on a flight if there already exists a reservation in your name.

A child entity object cannot exist without its parent. When a child entity object is created, the foreign key assignments are made, and the parent entity object must have non-null values for the primary key. At runtime, if a child entity object changes, the parent is marked as needing validation. During a commit, the parent entity object is validated, then the child entity object is validated.

connection

To connect to a database during development, you define a Connection object, including a connection name (used by JDeveloper), username, password, role (a named group of privileges that a database administrator can create, required for IIOP), and driver. When you are ready to deploy, you can switch to the deployment database, if you developed using a different database. You can connect using JDBC or IIOP.

connection pooling

In version 3.2 of Business Components for Java, connection pooling is the new default behavior. Instead of one JDBC connection being created for each application module instance, and being destroyed when the instance disconnects, application modules can now reuse a pool of connections. There is one connection pool for each JDBC connection URL, including the username and password.

Opening a connection to a database is a time-consuming process that can sometimes take longer than getting the data itself. The advantage of connection pooling is that clients can have faster response times, because they are saved the time of creating the database connection. Instead, they can reuse a connection created by another application module instance.

In addition to using the default connection pooling behavior, you have these options:

CORBA

The Common Object Request Broker Architecture (CORBA) is an Object Management Group (OMG) specification. It defines the framework used to create distributed object computing systems, including definitions for static and dynamic invocation interfaces, an interface repository, and an object request broker (ORB).

Create Database Objects Tool

Lets you create database tables based on the information in entity objects and, if specified, their database constraints as specified in the Entity Constraint Wizard. This is called forward generation. To access the tool, in the Workspace view of the Navigator, right-click a business components package and choose Create Database Objects.

 

D

Default Value attribute setting

This setting appears in the Attribute Settings page of the Entity Object Wizard and Editor and the Domain Wizard and Editor, and in the Attribute Editor.

For an entity object attribute, this setting is an optional default value. When the business logic tier creates a new row containing that attribute, the attribute gets this value by default.

For a domain, this default value is inherited by all attributes of this domain type and cannot be changed in the Entity Object Wizard or Editor or in the Attribute Editor.

domain

A domain defines the type of values an attribute can have. A domain object is a developer-defined data type, an immutable Java class encapsulating a scalar value or a structure, with simple validation built into the constructor of the domain. The validation check occurs when an object of that domain type is created. The advantages of creating domains are:

JDeveloper provides a Domain Wizard and Editor for defining domains. You can use the resulting class on the thin client as well as the business logic tier to hold values of a specific type, such as a social security number. You can write code to format or validate the input string in the domain's validate method, which is called by all constructors. Domain classes can be associated with each field in a form. The form could directly instantiate an instance of the domain class with the field's given input string.

In the Domain Wizard and Editor, you can specify settings so that all attributes of that domain type inherit those settings. Attributes may further restrict domain settings, but may not make them less restrictive. For example, a domain could be marked Persistent, meaning no transient attribute can be of that domain type.

After you have created a domain object, you can use it as a data type for an attribute. For example, you could create a domain named SSNumber, and write validation code for it that ensures that the resulting data type is a string of nine characters.

Domains are always serializable Java objects. In the business components framework, it is recommended that domains have a constructor that can accept at least one of the native Java types, like String, byte[], Integer, and so on.

The business components framework also provides some predefined domains.

Domain Wizard and Editor

These tools let you create and edit domains.

While the business components project is open, to create a domain with the Domain Wizard either:

To edit a domain, in the Workspace view of the Navigator, right-click the domain and choose Edit domain.

When creating a domain, the wizard lets you specify the following information, listed by panel:

When editing a domain, the editor lets you specify information in the Domain Settings panel, and also provides the following panel:

You can write validation code in the domain's Java file (which was created by the wizard). For example, you could make sure a data type is a string of nine characters.

 

E

EJB

The Enterprise JavaBeans standard specifies a cross-platform component architecture for the development and deployment of multi-tier, distributed, scaleable, object-oriented Java applications. Also known as a Server Bean.

entity

In UML terms, a domain-specific noun, such as a customer, order, or item.

Entity Constraint Wizard

Lets you add constraints, which are used when you generate tables with the Create Database Objects Tool (forward generation). To access the wizard, in the Workspace view of the Navigator, right-click an entity object and choose Create Entity Constraint.

You can also create constraints while you define associations. In the Association Properties panel of the Association Wizard and Editor, select Use Database Key Constraints to automatically create a constraint based on the association.

An entity constraint is a business logic tier object that represents a key constraint in the database. An entity constraint describes, in terms of entity objects and attributes, the database-level relationships between tables and columns. You select the entity object's attributes and define the constraint in terms of database integrity constraints such as primary, foreign, check, or unique. When you create a database object based on an entity object, the definition of the entity constraint is used to detect associations between tables, create the specified key constraints in the database, and ensure that data in the database is valid and conforms to the key constraints.

entity definition class

A class extending directly or indirectly from oracle.jbo.server.EntityDefImpl. It stores runtime metadata describing the entity object, including attributes, events, validators, associations, and properties. When instantiated, it describes all instances of the entity object class. A client can call methods to find information about the entity object, such as the attribute names and types, database source, and so on. There is one entity definition class instance per entity XML file.

You can use the Entity Object Wizard and Editor to generate this Java class for an entity object when you need custom create and find methods. This class is a good place to group together methods that are used by all entity object instances. For example, you can optionally modify the createDef method to use properties from another source (in addition to or instead of the XML) when the entity definition is instantiated.

If an entity object publishes or subscribes to an event (as specified in the Publish and Subscribe panels of the Entity Object Wizard and Editor), most of the event code is generated in the definition files of the entity objects that publish and subscribe.

You can specify that this class extend from a custom class (which must directly or indirectly extend the EntityDefImpl class and be in the project classpath); for example, you might do this if you want to reuse code that's already been written or if your organization decides to customize the business components framework to meet specific needs.

entity object

In general terms, entity objects encapsulate the business policy and data for

Specifically, an entity object stores the business logic and column information for a database table (or view, synonym, or snapshot). You can create entity objects from existing database tables (reverse generation) or define entity objects and use them to create database tables (forward generation).

When you use a Business Components for Java wizard to create entity objects from existing tables, each column in the database table becomes an entity object attribute, which can have the same name as the column or a different name that is more meaningful to your business application; an entity object can have an attribute for each column or use a subset if a table contains information for more than one entity. The attributes of an entity object store data type information as specified in the database table they were derived from, including primary and foreign key relationships, the number of characters allowed, precision and scale specifications, and object REFs.

You can create and edit entity objects by using the Entity Object Wizard and Editor. Usually, you have one entity object per table. If you have multiple entity objects per table, make sure that each updateable attribute appears in one entity object only; otherwise, you could make changes in a row that are not reflected in the other entity object.

During runtime, each entity object instance represents a row in the database table and stores its data. There is only one instance per row, and all instances of the same entity class are cached together. Multiple view object queries returning the same row refer to the same entity object instance, so updates are visible to all view objects; one entity object can be used by multiple view objects.

Entity objects are not exposed to clients. Instead, clients access an entity object’s data through one or more view objects. In the view row class, you can expose entity object methods to a client by writing a view object method that calls the method you want to expose.

Relationships between entity objects are expressed through associations; they match attributes, typically key fields, from source and destination entity objects. Methods that return rows and row sets through the association are available on the entity object class.

You implement the majority of your business logic in entity objects. For example, validation rules (such as "sal > 700") can ensure that the values returned by a query are valid or that users do not enter invalid data into a table. Business logic is defined and updated in one place, with the benefit that multiple clients can use it and be instantly updated when changes are needed.

To decide what entity objects your application needs, you usually use UML object-oriented modeling techniques.

entity object class

A class directly or indirectly extending from oracle.jbo.server.EntityImpl. When it is instantiated, it becomes one row. You can use the Business Components Project Wizard, Package Wizard or Editor, or Entity Object Wizard or Editor to generate this Java class for an entity object if you want to customize methods, such as add custom validation logic code to the validateEntity method or attribute setter methods, or calculate attribute values in the getter methods. You can specify that this class extend from a custom class (which must directly or indirectly extend the EntityImpl class and be in the project classpath); for example, you might do this if you want to reuse code that's already been written or if your organization decides to customize the business components framework to meet specific needs. In the wizard, you can optionally generate

Entity Object Wizard and Editor

These tools let you create and edit entity objects. You can also create default entity objects in the Business Components Project Wizard and Package Wizard or Editor. The entity objects can be based on existing tables (reverse generation) or be used to create database tables (forward generation).

While the business components project is open, to create entity objects with the Entity Object Wizard either:

To edit an entity object, in the Workspace view of the Navigator, right-click the entity object and choose Edit object.

When creating an entity object, the wizard lets you specify the following information, listed by panel:

When editing an entity object, the editor lets you specify the following information:

If you add referential integrity constraints to tables after you've already generated entity objects for them, you can simply go into the Entity Object Editor and click Finish to create the new associations. For other database table changes, you can make the change manually in the Entity Object Editor. For example, you can add attributes corresponding to new columns.

Expression attribute setting

This setting appears in the Attribute Settings page of the View Object Wizard and Editor and in the Attribute Editor. For a SQL-derived view object attribute, a valid SQL expression is used to define the value of the attribute.

 

F

fault-in mechanism

If a user of a client enters a value that causes the business logic to ask for the value of one of the excluded attributes in a view object, then the business logic tier uses the primary key value to go to the database and retrieve all of the attributes for the row (including the excluded ones). This is called "fault-in:" the client's attempt to access an entity object attribute that is not included in the view causes the entity object to retrieve all of the remaining attributes. Fault-in occurs on the entity object instance level; only the effected rows are faulted in. After the fault-in, the cache contains one fully populated row that was the result of the fault-in. This on-demand faulting prevents request failure.

For example, if you have a view object that includes the employee level and name, and when you change the level to 3 from 4 the entity object checks the salary, then you are attempting to read an attribute not included in the view. To avoid fault-in and two trips to the database, you can include the salary in view.

When you design a view object, consider the following:

forward generation

You first define your entity objects in the Entity Object Wizard and Editor, then use them to create your database tables and optionally constraints with the Create Database Objects Tool. See also reverse generation.

forward only mode

You can use the setForwardOnly method in a view object to prevent data from entering the entity object cache. Only one row is worked with at a time, and the data cannot be changed. If you won't be changing data and there is not a lot of repeated data, using forward only mode can save memory resources and time, because fewer objects are created. Forward only mode is useful when you are fetching data and reading it once, such as formatting data for a web page, or for batch operations that proceed linearly.

framework

A class library with built-in application functionality. Using a framework involves specializing base classes to introduce application-specific behavior, allowing the framework to coordinate many of the basic interactions between objects.

For the business components framework, the classes are in oracle. jbo.*.

 

H

HTML

The Hypertext Markup Language is a non-proprietary language for publishing hypertext on the World Wide Web. It is based on SGML. HTML uses tags to structure text into headings, paragraphs, lists, hypertext links, and so on, which you can display in a web browser.

 

I

IIOP

Internet Inter-ORB Protocol, the protocol used for communication between Object Request Broker (ORB) clients and servers. It is used with CORBA.

iterator

Each view object provides a default iterator (through the oracle.jbo.RowIterator interface) that a client can use to navigate through its result set. A view object does not execute a query until its iterator requests data. The iterator can enumerate the contents of a row set, including providing forward and back navigation, and next and previous navigation. The row iterator can be used with ranges to iterate over a range of rows in a UI more easily, including letting you use relative navigation within the range. Range-aware row iterators are useful for grid controls.

 

J

JSP

JavaServer Pages technology provides a fast way to create dynamic web pages by using XML-like tags and scriptlets written in Java. It lets you rapidly develop server- and platform-independent web-based applications. JavaServer Pages are an extension of the Java Servlet API.

JDBC

Java Database Connectivity is an API specification for retrieving and manipulating data in a database from Java code. Requests are in SQL. A JDBC-ODBC bridge lets you access databases through ODBC.

 

M

Mandatory attribute setting

This setting appears in the Attribute Settings page of the Entity Object Wizard and Editor and the Domain Wizard and Editor, and in the Attribute Editor.

When selected, each entity object row must have a non-null value for this attribute. If it does have a null value, the row is considered to be invalid when you navigate away from it or try to commit.

If an entity attribute is of a domain type, and the Mandatory attribute setting is set in the domain, you cannot override the setting in the Entity Object Wizard or Editor or Attribute Editor.

metadata

Data about another set of data (your application data), such as how it should be formatted. Business Components for Java represents metadata as XML definition files, containing information about the structure and behavior of your business components. It contains descriptive information about the features and settings of an application that you can declare with the Business Components for Java wizards and editors during design time. Some examples of metadata are the names and types of attributes, a SQL query, and validation rules. Information that is descriptive in nature is stored as XML while programmatic information is in Java.

 

N

Name attribute setting

This setting appears in the Attribute Settings page of the View Object Wizard and Editor and the Entity Object Wizard and Editor, and in the Attribute Editor.

The required attribute name setting specifies the name that the attribute is referenced by in the Business Components for Java wizards, the Java source code, and the XML files.

 

O

ODBC

Open Database Connectivity is a standard API for accessing a database. Applications can use SQL requests to access databases, and ODBC converts it into a request that this database understands. ODBC was created by the SQL Access Group. A JDBC-ODBC bridge allows applications using JDBC to reach ODBC-accessible databases.

optimistic locking

When an entity object uses optimistic locking, at commit time, the entity object attempts to lock its corresponding row in the database. If the entity object is part of a composition, the framework first tries to lock the parent entity object. If the attempt to lock is unsuccessful, an exception is thrown. Also see pessimistic locking. Locking is defined in the oracle.jbo.Transaction interface through the setLockingMode method.

 

P

packages

In a business components project, you need to decide what business components you want to group in the same package, so they have access to package private methods and variables, and which business components should be in different packages. Business components in separate packages can interact through public methods and variables; you can also reuse the packages in other projects as needed. As a general guideline, you can create the following packages in your business components project(s) for each application:

You need to functionally decide what objects to put together in packages according to what methods you want internal team members to use versus what you want external teams to use. If it gets delivered together as a component, put it in one package. Different application feature teams might need to be able to work independently on their functionality.

Package Wizard and Editor

These tools let you create and edit packages. They provide some of the same functionality as the Business Components Project Wizard.

While the business components project is open, to create a package with the Package Wizard, do one of the following:

To edit a package, in the Workspace view of the Navigator, right-click the package and choose Edit package.

The wizard and editor help you specify

You can also create and edit entity objects, associations, view objects, and view links by using the Entity Object Wizard and Editor, View Object Wizard and Editor, Association Wizard and Editor, and View Link Wizard and Editor.

Persistent attribute setting

This setting appears in the Attribute Settings page of the Entity Object Wizard and Editor and the Domain Wizard and Editor, and in the Attribute Editor.

For an entity object attribute, select this setting to make the attribute persistent (the entity saves it in persistent storage — the database). Deselect it for a transient attribute.

If an attribute is of a domain type, and the Persistent attribute setting is set in the domain, you cannot override the setting in the Entity Object Wizard or Editor or Attribute Editor. So for transient attributes, Persistent should be not selected in the domain.

pessimistic locking

When an entity object uses pessimistic locking, the first time one of its attributes is successfully modified, including passing any validation, the entity object attempts to lock its corresponding row in the database. If the entity object is part of a composition, the framework first tries to lock the row for the parent entity object. If the attempt to lock is unsuccessful, an exception is thrown. Also see optimistic locking. Locking is defined in the oracle.jbo.Transaction interface through the setLockingMode method.

Primary Key attribute setting

This setting appears in the Attribute Settings page of the Entity Object Wizard and Editor and Domain Wizard and Editor, and in the Attribute Editor. For an entity object attribute, when selected, this attribute is (or is part of) the entity object's primary key. (More than one attribute can make up a primary key.)

If an attribute is of a domain type, and the Primary Key attribute setting is set in the domain, you cannot override the setting in the Entity Object Editor.

Project Wizard

After choosing File | New Project, the Project Wizard appears, which lets you create a new project. You specify

If you create a business components project, the Business Components Project Wizard appears after you click Finish.

property

In a business components project, properties are name/value pairs of type string that you can use as metadata to drive runtime behavior. (Do not confuse them with JavaBean properties: they're different.) Domains, entity objects, view objects, application modules, and entity and view object attributes can have properties. The properties are stored in the component's XML file.

You can define any properties you need in the appropriate Property panel of a wizard or editor, such as the Entity Object Wizard and Attribute Editor. Some uses of properties are

For example, an attribute could have a Label property that specifies what the label should be when the attribute is displayed in the UI. Another example is when you are laying out a presentation space and want to use a mask (or picture string). To define properties for a string that represents a social security number, you could create a SSN-MASK property with a value of 000-00-0000. At runtime, you could evaluate the property name and apply the proper formatting when appropriate.

Attribute and domain properties can be overridden to be more restrictive. Following is the hierarchy, from least restrictive to most restrictive:

For example:

The length property on the entity object's Dname attribute overrides the domain character limit of 20 characters; so a department name can be 15 characters. The length property on the view object's Dname attribute overrides the department name limit; so a department name can be 10 characters.

You can get and set properties at runtime by using methods defined in the NamedObjectImpl class, such as getProperty, setProperty, getProperties, and getPropertiesAsStrings. Other classes extend this class, including EntityDefImpl, ViewObjectImpl, ApplicationModuleDefImpl, and AttributeDefImpl. Clients can query properties and make decisions based on property values, but cannot set properties.

 

Q

Queriable attribute setting

This setting appears in the Attribute Settings page of the View Object Wizard and Editor, the Entity Object Wizard and Editor, and the Domain Wizard and Editor, and in the Attribute Editor.

For an entity object attribute, when selected, the attribute can participate in a view object's query condition. If not selected, the information cannot be queried (BLOB types, for example).

For a view object attribute, when selected, the attribute can participate in a query condition. For a persistent attribute, if the columns (to which attributes of this type are mapped) can be part of a query filter (a WHERE clause), then this setting should be selected. For example, this property should be selected for NUMBER column types, but not set for BLOB types. This attribute will be suppressed from Query by Form interfaces.

If an attribute is of a domain type, and the Queriable attribute setting is set in the domain, you can override the setting in the View Object Wizard or Editor, but not in the Entity Object Wizard or Editor.

 

R

Refresh After attribute setting

This setting appears in the Attribute Settings page of the Entity Object Wizard and Editor and the Domain Wizard and Editor, and in the Attribute Editor.

A persistent entity object attribute can optionally have one or both of the following settings:

If an attribute is of a domain type, and the Refresh After attribute setting is set in the domain, you cannot override the setting in the Entity Object Wizard or Editor.

reverse generation

You first define your database tables (and views, synonyms, and snapshots), then use them to create entity objects in the Entity Object Wizard or Editor, Business Components Project Wizard, and Package Wizard or Editor. See also forward generation.

rollback

Discards the changes made in the current transaction. The second half of the recovery procedure. After the roll forward, any changes that were not committed must be undone. After the redo log files have been applied, the rollback segments are used to identify and undo transactions that were never committed, yet were recorded in the redo log. Oracle completes this step automatically.

row object

Any object that implements a oracle.jbo.Row interface. When a view object query fetches one or more result rows, individual rows are represented by Row objects. Each column value in the result row is accessed through an attribute of a row interface. The row interface has methods like getAttribute and setAttribute.

 

S

Selected in Query attribute setting

This setting appears in the Attribute Settings page of the View Object Wizard and Editor. When selected, the attribute appears in the view object's SQL Select statement; otherwise, it doesn't.

server

The provider of services requested by a client. A single machine can be both a client and a server depending on the software configuration.

SID

A unique name for an Oracle database instance. To specify a connection to a database, users must specify the desired SID.

snapshot

A read-only copy of a master table located on a remote node. A snapshot can be queried, but not updated; only the master table can be updated. A snapshot is periodically refreshed to reflect changes made to the master table. In this sense, a snapshot is really a view with periodicity.

synonym

An alias for a table, view, snapshot, sequence, procedure, function, or package. It is another name assigned to a table for easy identification. For example, if you refer to tables residing in other accounts or databases, you may find it convenient to define a synonym for the long string of identifiers. If a table name changes, you can simply redefine the synonym rather than rewrite all related queries. Synonyms are used to mask the real name and owner of an object, provide public access to an object, provide location transparency for tables, views, or program units of a remote database, and simplify the SQL statements for database users. A synonym can be public or private.

 

T

Tester

To access the Business Components Tester (also called the Business Components Browser), in the Workspace view of the Navigator, right-click an application module and choose Test.

The Oracle Business Components Tester is an example of a generic, thin Java client application. It uses the dynamic capabilities of the framework's client APIs to interrogate the runtime metadata of any application module that you want to exercise, and presents a directory of the view objects and view links contained by the current application module. The Tester creates dynamic Swing-based forms for each view object you want to browse, and dynamic master-detail forms for each view link that you want to test.

The Oracle Business Components Tester visually exposes all of the runtime features of the framework including:

When you commit, all pending changes are communicated to the database by the underlying entity objects in the cache.

thin client

A client that retrieves only the data necessary for display, while business logic is performed in another tier.

transactions

A transaction is an interface to manage database operations. All operations to modify data in a transaction must succeed before the server will accept the changes. These operations include methods that set attribute values, standard SQL calls (such as INSERT, UPDATE, and DELETE), or more specialized calls such as calling Java stored procedures or SQL packages. A transaction is an atomic unit; the effects of the operations in a transaction can be either all committed (saved to the database) or all rolled back (undone).

For example, when a client using a banking service transfers money from a savings account to a checking account, the transaction consists of three separate operations: decrement the savings account, increment the checking account, and record the transaction in a transaction journal. If all three operations are performed to maintain the accounts in proper balance, the transaction is committed and the effects of the operations applied to the database. But, if something (such as insufficient funds, invalid account number, or a hardware failure) prevents any of the operations from completing, the entire transaction must be rolled back so that the balance of all accounts is correct.

Transactions also provide multi-user consistency to a shared store of data. When a client changes data, locks ensure that other clients don't make other changes until the first client is finished. When a transaction is committed or rolled back, the locks are released.

Business Components for Java application modules provide default transaction and concurrency support. No coding is required unless you want to customize the default behavior.

When programming with business components, the principles of transaction management are the same from the business logic tier as from a client:

  1. Create an application module that connects to the database and establishes a context for the transaction.

  2. Execute a query.

  3. Manipulate the result set (set attributes, validate values).

  4. Commit changes to the database (making the new data available to other application modules) or roll them back, as appropriate.

The business components framework uses a batch-oriented (as opposed to a change-oriented) approach to synchronize changes in any cached state with the database state. This approach provides the following benefits:

Type attribute setting

This setting appears in the Attribute Settings page of the View Object Wizard and Editor, the Entity Object Wizard and Editor, and the Domain Wizard and Editor, and in the Attribute Editor. All Java variables have a type, and the type restricts the kinds of objects that can be assigned to it.

For an entity object attribute, this setting is the Java data type or domain type of the attribute. You can also specify a Database Column Type, which is the SQL datatype of the database column; it is used to derive the default Java JDBC type at runtime. The SQL data type must correspond the Java data type, or you can get runtime exceptions, particularly for string conversions. During forward generation, the Database Column Type becomes the column type in the database.

For a view object attribute, this setting is the Java data type or domain type of this attribute. For persistent and entity-derived attributes, you can't change the type from that specified in the corresponding entity attribute.

For a domain, this setting is the Java type of the domain's mdata field.

If an attribute is of a domain type, and the Database Column Type attribute setting is set in the domain, you cannot override the setting in the Entity Object Wizard or Editor.

 

U

UML

The Object Management Group's (OMG) Unified Modeling Language is a general, notational language, based on earlier standards like Booch, OMT, and OOSE, for specifying and visualizing complex software. It is ideal for large object-oriented projects.

Unique attribute setting

This setting appears in the Attribute Settings page of the Entity Object Wizard and Editor and the Domain Wizard and Editor, and in the Attribute Editor.

For a persistent entity object attribute, when this setting is selected, there can be only one row with a certain value (each row has a unique value in this column). During forward generation, the corresponding not null database constraint is created.

If an attribute is of a domain type, and the Unique attribute setting is set in the domain, you cannot override the setting in the Entity Object Wizard or Editor.

Updateable attribute setting

This setting appears in the Attribute Settings page of the View Object Wizard and Editor, the Entity Object Wizard and Editor, and the Domain Wizard and Editor, and in the Attribute Editor. This setting determines whether you can call a setAttribute method on an attribute. An attribute must have one of the following Updateable settings:

For a persistent or entity-derived view attribute, the updateability of the attribute can be restricted further than that of the corresponding entity attribute, but it can't be made "more updateable." So if the entity attribute setting was Never, but the view attribute setting was Always, the setting would remain Never. The same principle applies if an attribute is of a domain type.

 

V

validation logic

Business Components for Java provides a framework for defining, implementing, and executing validation logic in the business logic tier. The validation framework provides a consistent programming model that hides internal implementation details. It frees you to focus on rules that prevent users from entering invalid values into the database.

Note that validation is different from an integrity (or "database") constraint. An integrity constraint is a declarative way to define a business rule for a column of a table. Integrity constraints are defined with a table and are stored as part of the table's definition, centrally in the database's data dictionary, so that all database applications adhere to the same set of rules. You can use integrity constraints (in addition to validation) when some clients do not use Business Components for Java.

You can define and apply validation logic in the following ways, either using a programmatic (Java) or declarative (XML) technique. If you have multiple levels of validation, the validation will trigger in this order, from first to last.

The business components framework supports various validation levels: you can validate attributes, entities, and the logical business objects. JDeveloper invokes validation logic at the appropriate level when data is created or changed, and assumes that data already in your tables is valid. So a query could return a result set that contains invalid values (for example, from legacy data entered before the validation logic was applied), but a user cannot enter an invalid value into the table. The framework invokes rules on contained objects before invoking rules on top-level objects.

validation rule

In entity objects, you can use validation rules to ensure that the values returned by a query are valid or that users do not enter invalid data into a table (for example, that an employee's salary must be greater than 700). Validation rules are JavaBeans that encapsulate reusable validation code for use across entity objects.

In the Validation panel in the Entity Object Wizard and Editor and Attribute Editor, you can specify validation rules and validation levels, and an execution order within the same level. A validation level indicates whether the rule is applied to the attribute level or the entity object level, depending on which you select. Applying validation rules involves attaching XML metadata to an entity object. When you use the wizard (as opposed to writing everything by hand), it generates XML, enabling you to customize rules without recompiling Java code.

At runtime, attribute-level validation rules are invoked when the attribute value is modified through a generated setter method, or by the setAttribute method called on the entity object. The entity-level validation rules are invoked when the current row in the client's iterator changes from this entity object to the next; or during the commit cycle if an entity object is invalid; or by an explicit validate method call on the entity object.

Business Components for Java provides predefined rules, and you can create your own.

In the Registered Rules panel of a Business Components Project Editor, you can create and register a custom validation rule, implemented in a validation class that is in your project. Either click New to create a new class, then customize it, or register a class you've already customized. Registered validation rules are stored as a list with the project's XML definition (JPX file). You can apply registered rules to an entity object or attribute the same as you would one of the predefined validation rules.

view

A datasource made up of columns from one or more database tables, combined into one logical table. It is a custom-tailored presentation of the data in one or more tables. Also known as a stored query. Views are a kind of virtual table — an object that acts like a table when you execute a query, but is really a pointer to either a subset of a table, a combination of tables, or a join of two or more tables.

In UML, a view is a projection of a model. A projection is a mapping from a set of elements to a subset of itself. A projection of a model, which is seen from a given perspective or vantage point and omits entities that are not relevant to this perspective.

view link

Defines a relationship between view objects, which represent views of tables. The relationship can be one-to-one or one-to-many, and you can use multiple view links to create a many-to-many relationship. The View Link Wizard and Editor lets you specify source and destination view objects, and links them using attributes selected from the view objects.

An example of a one-to-many relationship could be a DepartmentView view object linked to a EmployeeView view object in a master-detail relationship. With this view link, you could efficiently look at information about employees in a particular department.

An example of a more complex one-to-many relationship could be a CustomerView view object linked to an OrderView view object in a master-detail relationship, and the OrderView view object linked to an ItemView view object in a master-detail relationship. So a user could quickly look at the items in a particular customer's order in one form.

View links can be created based on associations, but an association is not needed to use a view link. View links are navigable in one direction (master to detail, not detail to master), while associations are bidirectional. So if you want to traverse both directions between two view objects, you need to create two view links. If the default relationship does not provide adequate functionality, you are able to create complex relationships through the Association SQL panel of the View Link Wizard or Editor.

If a view object is specified as a detail view in a link, the view object restricts the data to the detail information (like adding a WHERE clause to the SQL statement that defines the view object); otherwise, view objects provide unrestricted views, with all data available. In other words, a view link selects a correlated view of underlying data based on bind values supplied by the master view.

When two view objects are linked in a master-detail relationship in an application module, the default (or first) iterator for the master view object fires events to refresh the detail view object. When the detail view object is created, the business component framework registers it as an event listener for the master's iterator. So, when the iterator moves to another row in the master view object, the contents of the detail view object are refreshed automatically.

You can reuse view links in application modules. You can also create view links dynamically at runtime using the Business Components API.

Note that if a view link is based on an existing association, and the association has been defined as a composition, then when creating a detail view row, the master view row must exist and have non-null key values. If the association has not been defined as a composition, no such restriction applies.

In UML terms, a link is an instance of an association that represents a connection between two or more objects.

View Link Wizard and Editor

These tools let you create and edit view links. You can also create default view links, based on existing associations, by using the Business Components Project Wizard, Package Wizard, and Entity Object Wizard.

While the business components project is open, to create a view link with the View Link Wizard either:

To edit a view link, in the Workspace view of the Navigator, right-click the view link and choose Edit link.

When creating a view link, the wizard lets you specify the following information, listed by panel:

When editing a view link, the editor lets you specify the same information.

If you add an association after you have created a view object, you can manually add the link in the wizard.

view object

Uses SQL queries to specify filtered subsets of attributes from entity objects. The views of data are SQL-based and separate from the underlying entity objects, enabling flexible data retrieval to support the required UI. In other words, you can query a set of data exactly as you want to show it in the display. View objects provide clients with row sets they can scroll through and update without concern for or knowledge of the underlying entity objects. Clients manipulate data by navigating through the result set, getting and setting attribute values; changes are made to the data in the underlying database when the transaction is committed. Relationships between view objects are expressed using view links. Each view object provides a default iterator that you can use to navigate through its result set.

View objects are often used to:

You can define multiple view objects per entity object, and a view object can select data from multiple entity objects. Data is cached at the entity object level and all view object references within the same transaction share the cache, so changes made through one view object are immediately available to other view objects in the same transaction.

When you define a view object, you can specify which underlying entity objects are read-only and which support read/write operations on participating attributes in the view object's attribute list.

In the Application Module Wizard and Editor, you can choose the view links that you want to use to link view objects in master-detail relationships. View links can also be specified in code that executes at runtime. Detail view objects are automatically synchronized with their respective master view objects.

An application module can use the same view object more than once, such as an unrestricted view and a detail view; you can specify aliases to represent the various usages of a given view object.

view object class

A class extending directly or indirectly from oracle.jbo.server.ViewObjectImpl. You can use the Business Components Project Wizard, Package Wizard or Editor, or View Object Wizard and Editor to generate this Java class if you want to customize methods, such as an overridden create method so you can dynamically modify aspects of the view definition for that view object instance; for example, automatically setting bind variables in the Where clause or automatically adding Where clause criteria for security or filtering. You can also verify client IDs so they can only query their own information from a multi-client table, instead of having each form add this Where clause. You put methods in the view object class rather than in the view row class if they operate on the default rowset and are not specific to a row but are specific to that view object.

You can specify that this class extend from a custom class (which must directly or indirectly extend the ViewObjectImpl class and be in the project classpath); for example, you might do this if you want to reuse code that's already been written or if your organization decides to customize the business components framework to meet specific needs.

View Object Wizard and Editor

These tools let you create and edit view objects. You can also create default view objects in the Business Components Project Wizard, Entity Object Wizard or Editor, and Package Wizard or Editor.

Default view objects are very simple in their definition. Use the View Object Wizard and Editor to create and edit view objects so they are tailored to your needs. This might include a view object that uses

The ability of a view object to use multiple updateable entity objects enables one of the key features of Business Components for Java: a single view object can update multiple entity objects.

While the business components project is open, to create view objects with the View Object Wizard either:

To edit a view object, in the Workspace view of the Navigator, right-click the view object and choose Edit object.

When creating a view object, the wizard lets you specify the following information, listed by panel:

When editing a view object, the editor lets you specify the following information, in addition to the previous panels:

If you change a database table after you have created a view object and you need to modify the view object, you can make the change manually in the View Object Editor. For example, you can add attributes corresponding to new columns in the entity object.

view row class

A class extending directly or indirectly from oracle.jbo.server.ViewRowImpl. You can use the View Object Wizard or Editor to generate this Java class if you want to customize methods, such as implement custom logic for calculating values for this view (in attribute getter methods). This class can hold methods acting on row; methods that need the data in one row to operate. In the view object class, you can add methods that operate on row set. In addition, you can expose entity object methods to clients by creating row class methods that call a method in an entity object.

You can specify that this class extend from a custom class (which must directly or indirectly extend the ViewRowImpl class and be in the project classpath); for example, you might do this if you want to reuse code that's already been written or if your organization decides to customize the business components framework to meet specific needs. In the wizard you can optionally choose to generate accessor methods (for example, getJob and setJob), which provide type-safe access to the corresponding attribute fields and a place to add your own custom code for validation.

 

W

wizards

Business Components for Java provides the following wizards, editors, and tools:

 

X

XML

The Extensible Markup Language defines a universal standard for electronically exchanging data. XML specifies a rigorous, text-based way to represent the structure inherent in data so that it can be authored and interpreted unambiguously. Its simple, tag-based approach leverages developers’ familiarity of HTML but provides a flexible, extensible mechanism that can handle the gamut of "digital assets" from highly structured database records to unstructured documents and everything in between.