hi alan,
ok, now i understand. i'll make it public or provide another public method.
jakob
Olmanson, Alan wrote:
Jakob,
Exactly. And I don't really want to define my own proxy class. I want to
have access to the Collection class that the proxy is using. OJB does use my
class when I have collection-class= and proxy=true, however as you say OJB
wraps it with the CollectionProxy. Thus my orginial question, "I was
wondering if the getData method on the CollectionProxy could be made
public?". Since if the getData method was public I could call getData()
which would return my collection class, and they I could call the methods
I've added to my implementation of collection.
Alan
-----Original Message-----
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 11:42 AM
To: OJB Users List
Subject: Re: CollectionProxy.getData()
hi alan,
unfortunately it's not that simple. if you specify a class using
collection-class= and set proxy=true ojb will create a Collection-or
ListProxy around your class. the current version of ojb provides no way to
define your own proxy class.
hth
jakob
On Thu, 23 Jan 2003 13:40:20 -0600, Olmanson, Alan
<[EMAIL PROTECTED]> wrote:
Jakob,
So if I understand correctly, you are suggesting that I extend
CollectionProxy with something like com.fpinc.FPCollection. Then in my
repository.xml file on my collection-descriptors I would have something
like:
<collection-descriptor name="flags"
collection-class="com.fpinc.FPCollection" element-class-
ref="ActivityFlag"
auto-update="true" auto-delete="true">
<inverse-foreignkey field-id-ref="1"/>
</collection-descriptor>
How to do let OJB know that this Class is a proxy class and that it
should
use the construtor of the type MyCollection(PBKey aKey, Class aCollClass,
Query aQuery)? Won't ojb just use the default constructor on
FPCollection?
--
What I was trying to do is have something like:
<collection-descriptor name="flags"
collection-class="com.fpinc.FPVector" element-class-ref="ActivityFlag"
proxy="true" auto-update="true" auto-delete="true">
<inverse-foreignkey field-id-ref="1"/>
</collection-descriptor>
Where FPVector extends ManageableVector. And the collection proxy happens
as
normal, however if I do this I can't get to the FPVector to access the
methods I've added it.
Alan
-----Original Message-----
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 12:17 PM
To: OJB Users List
Subject: Re: CollectionProxy.getData()
hi alan,
oh i thought it was private. can't you use inheritance for your class
like i did with ListProxy ?
jakob
Olmanson, Alan wrote:
Jakob,
It currently is protected.
How would you suggest I get at the underlying collection of the
CollectionProxy, if the getData() method is protected? I'm trying to
get
it
from a class that isn't in the org.apache package structure, i.e. a
class
which doesn't have access to the protected methods of CollectionProxy.
I would like to see it as public, or a different public method which I
can
call to get the underlying Collection class.
Alan
-----Original Message-----
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 10:52 AM
To: OJB Users List
Subject: Re: CollectionProxy.getData()
hi alan,
i'll make it protected.
jakob
Olmanson, Alan wrote:
Hello,
I was wondering if the getData method on the CollectionProxy could be
made
public?
I've defined a custom Collection implementation on my
collection-descriptors, however when I'm making use of the
CollectionProxy
I
can't access my Collection.
Alan
--
To unsubscribe, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:ojb-user-
[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>