Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Why can't I have an object with no attributes?

Re: Why can't I have an object with no attributes?

From: Richard Kuhler <noone_at_nowhere.com>
Date: Thu, 12 Jun 2003 18:08:17 GMT
Message-ID: <lk3Ga.51882$49.1558771@twister.socal.rr.com>


Jan Gelbrich wrote:
>
> Hi, Richard,
>
> just curious:
> why donīt You just use a function for that purpose ?
> That is what stored procedures are for since long ago.
>
> Create or replace function foobar
> return varchar2
> as
> ...
> begin
> ...
> end;

Because, my intention is to build an interface that many other objects could implement. Then polymorphism allows you to use the defined interface with any of the subclasses. It's a fairly essential part of producing reusable object oriented code. I can of course still make the interface but I have to add a useless attribute when I build the object (dummy char(1)). I was hoping someone would have done this before and be able to suggest a better workaround.

Thanks,
Richard Received on Thu Jun 12 2003 - 13:08:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US