Edit D:\app\Administrator\product\11.2.0\dbhome_1\javavm\demo\examples\jsproc\basic\object\point3.sql
Rem point3.sql drop table point_table; drop type point force; create or replace type point as object ( x number, y number, member function jdistance (p point) return number, member procedure moveby (p point) ); / create or replace package pointruntime is function jdistance (p1 point, p2 point) return number; function moveby (p1 point, p2 point) return point; end; / create or replace type body point is member function jdistance (p point) return number is begin return pointruntime.jdistance (self, p); end; member procedure moveby (p point) is begin self := pointruntime.moveby (self, p); end; end; / create or replace package body pointruntime is function jdistance (p1 point, p2 point) return number is language java name 'Point3Runtime.jdistance (Point3, Point3) return double'; function moveby (p1 point, p2 point) return point is language java name 'Point3Runtime.moveBy (Point3, Point3) return Point3'; end; / create table point_table (p point); insert into point_table values (point (0, 0)); insert into point_table values (point (3, 4)); insert into point_table values (point (10, 10));
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de