[top]
[prev]
[next]

Road Map
Glossary
Table of Contents
Index
Documentation Top
Global Index
|
Using Cloudview to Work with Stored Objects
Cloudscape's Java extensions allow Cloudscape to store more than just SQL-92 data types. It can store instances of Java classes, known as Java objects.
To store Java objects in a table, associate a column with their Java class. The Cities table stores JBMSTours.serializabletypes.City objects, instances of the class JBMSTours.serializabletypes.City.
Open the javadoc file forJBMSTours.serializabletypes.City or view the source file for
JBMSTours.serializabletypes.City.java for information about this data type. Javadoc for JBMSTours is in the demo/programs/tours/javadoc directory.
Examine the Cities Table Definition
- If you are not currently in Cloudview with an open connection to the toursDB database, start the program as described in Start Cloudview in the Home Directory. Then open a connection to toursDB as described in Open a Connection to toursDB. Select the toursDB icon in the left-hand hierarchy window. Click the "+" to the left of the icon to display the Table icon.
- Click the "+" sign to the left of the Table icon to display the tables in toursDB.
- Select the Cities table icon.
- Select the Table tab.
- Examine the column definitions in the Cities table. Note that the second column, called CITY, is a Java data type. The column is associated with the JBMSTours.serializabletypes.City Java class.
Browse the Contents of the Cities Table
- Select the Data tab in the right-hand window to display the contents of the Cities table.
- Scroll through the data.
CITY_ID and COUNTRY_ISO_CODE are SQL-92 data types, so you can see the complete contents by browsing this window. However, the City column contains Java objects. You cannot "see" those objects from this window. These objects contain several fields, which are not displayed. What you see is only the toString values of the objects.
Browse a City Object
Cloudview offers a tool for viewing some of the data contained in objects: the Object Inspector.
- Select Santiago, Chile in the CITY column (CITY_ID 40), then click the Magnifying Glass (inspect) button.
The Object Inspector window appears.
- Click the "+" to the left of the JBMSTours.serializabletypes.City icon to display its fields. If a field is public, its value is displayed.
Some of the fields are public, and thus their values are displayed.
- Leave the Object Inspector window open for the next section.
|