Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle objects and method encapsulation
I've done it successfully. One thing to note is top them at the top of the
package body, otherwise they are not known about when it compiles.
eg
if you do:
public method 1 ..
call private 1...
end public 1
private 1..
...
won't work. But:
private 1..
public method 1 ..
call private 1...
end public 1
...
will.
Jim
-- Replace part of the email address: kennedy-down_with_spammers_at_attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out. "Seth" <sgelberg_at_optonline.net> wrote in message news:f3159b28.0304190406.3e5c3aed_at_posting.google.com...Received on Sat Apr 19 2003 - 08:11:05 CDT
> Have you tried that using PL/SQL it doesn't work, oracle objects that
> sit in the db seemingly do not allow private methods. Every time I
> try to compile it it says method defined in body needed in spec.
>
> "Georg Scholz" <georg.scholz_at_vienna.at> wrote in message
news:<O7Tna.109857$UR.950832_at_news.chello.at>...
> > Do you mean the CREATE TYPE xxx AS OBJECT statement?
> >
> > Then you simply need to put the private functions in the BODY part
without
> > mentioning them in the declaration part.
> >
> > Georg Scholz
> >
> > "Seth" <sgelberg_at_optonline.net> schrieb im Newsbeitrag
> > news:f3159b28.0304180500.21854fd9_at_posting.google.com...
> > > Im wondering if it is possible to hide pl/sql methods in the objects
> > > body - the compiler seems not to allow this, but interestingly enough
> > > if I define the method as an external java method the compiler does
> > > not require a definition in the spec.
> > >
> > > It seems odd that Oracle would require all methods to be public,
> > > anyone know how to get around this.
![]() |
![]() |