Create the Animal Types
The name ANIMAL_STATEFLOW nows conforms to the original intent of the Nordic Database example.
Intro project of the
- Right-click on the
Nordic_databasewhich is under
Offline Database Sources
New Database Object...
- Change the name to
- In the editor window, change the code to:
- Right-click on
Application Navigator, and choose
CREATE OR REPLACE TYPE ANIMAL_STATEFLOW AS OBJECT ( current_state VARCHAR2( 30 ) ) NOT FINAL;
The other types are created similarly.
The name HUMAN_STATEFLOW nows conforms to the original intent of the Nordic Database example.
CREATE OR REPLACE TYPE human_stateflow UNDER animal_stateflow ();
CREATE OR REPLACE TYPE animal AS OBJECT ( name VARCHAR2(30), current_state animal_stateflow ) NOT FINAL;
CREATE OR REPLACE TYPE horse UNDER animal ();
CREATE OR REPLACE TYPE human under animal ( ) NOT FINAL;
CREATE OR REPLACE TYPE guy UNDER human();
CREATE OR REPLACE TYPE girl UNDER human();
Implement the Type Definitions
Use the CTRL key along with the left-click to select the following types:
Then right-click on the selection to get the context menu:
XE_Nordic...(Name of database connection)
REPLACEas the method to reconcile the objects
Finishto start to operation
OKon the results message box to acknowledge completion of the database schema update.
I had hoped that JDeveloper would have had a more sophisticated UI to create database types other that an online text editor.
I was further disappointed in the creation of views. There is no support for Object Views and imported object views have any object-related information stripped.
This leaves me in a quandry of how to proceed with this demonstration of TopLink. I could do all of the object-orientated stuff in the XE database only to have the development tool ignore it.