Object types appear within the Types node in the Object Navigator. An object type node represents a type created by the SQL statement, CREATE TYPE AS OBJECT. The object type is displayed in the Object Navigator as:
object-type-name ( Object Type [ * ] & Body [ * ] )
The Object Type label appears when a CREATE TYPE AS OBJECT statement has been issued to the database. An asterisk ( * ) appears when the type specification is invalid or if the type is incomplete. An incomplete type is a placeholder for defining types recursively.
The Object Body label appears when a type body has been created using the CREATE TYPE BODY statement. An asterisk ( * ) appears when the type body is invalid.
When both object type and object body have been successfully created, then the label appears as Object Type & Body.
Object type nodes are composite nodes; they have two subnodes, Attributes and Methods. An object type node can be expanded only if a valid type specification exists.
The attributes of an object type are represented as nodes under the Attributes subnode.
The methods of an object type are represented as nodes under the Methods subnode. The methods appear as procedures and functions. The method labels are displayed in the Object Navigator as:
method-name (Procedure)
and
method-name (Function)
If a map method or order method is specified for an object type, then the method label is displayed as:
method-name (Map Function)
or
method-name (Order Function)
Note: The argument list of a method is not displayed.
Oracle Object Support in the Object Navigator
The following SQL statement creates the object type emp_typ.
CREATE TYPE emp_typ AS OBJECT
(ename VARCHAR2(30), esalary NUMBER(5,2),
MEMBER PROCEDURE raise(amount NUMBER),
MEMBER FUNCTION get_salary RETURN NUMBER,
MAP MEMBER FUNCTION compare RETURN NUMBER);
The subtree for emp_typ is: