lotus

previous page: 9.3) Odapter/OpenODB: Odapter Object Storage
  
page up: Object-Oriented Technology FAQ
  
next page: 9.3) Odapter/OpenODB: Odapter and C++

9.3) Odapter/OpenODB: Odapter and Smalltalk




Description

This article is from the Object-Oriented Technology FAQ, by Bob Hathaway rjh@geodesic.com with numerous contributions by others.

9.3) Odapter/OpenODB: Odapter and Smalltalk

Odapter provides Smalltalk developers with
transparent access to information stored in the
underlying relational database.

Odapter's Smalltalk Class Builder utility
automatically generates ParcPlace Smalltalk
compatible classes and methods based upon an
Odapter object model. The developer can select
specific Odapter types and functions, resulting in
a corresponding set of Smalltalk classes and
methods. Once the Smalltalk schema is generated,
the Smalltalk developer can transparently access
the underlying relational database, as shown in
Figure 3.

printFlight
|allFlightObjects|
allFlightObject:=Flight allObjects.
AllFlightObjects do: [:aFlight|
Transcript show :aFlight flightno value; cr].
Figure 3

Figure 3 shows how to access the flight objects
shown in Figure 2 through Smalltalk. This example
retrieves all flight object identifiers and prints
the flight# for each one of the flight objects.

All Smalltalk classes and methods which result in
the access of Odapter structures are italicized.
Flight is a Smalltalk class that corresponds to the
Odapter type Flight. The Smalltalk methods
allObjects and flightno map to Odapter calls that
access data from the relational database storage
manager.

 

Continue to:













TOP
previous page: 9.3) Odapter/OpenODB: Odapter Object Storage
  
page up: Object-Oriented Technology FAQ
  
next page: 9.3) Odapter/OpenODB: Odapter and C++