"Gentry, Michael" <michael_gentr..anniemae.com> wrote:
> OK, I hope this isn't a silly question.
>
> To do my initial caching, I maintain a list of unfetched ObjectIds which
> I batch fetch in using QueryUtils.selectQueryForIds(List). If I get
> this custom batch faulting handler working, it would make more sense (I
> think) to convert my caching mechanism over to using the custom batch
> faulting handler.
>
> What's the best way to create faults (or hollow objects) on my own?
> Would it be sufficient to create instances of the class, set the state
> to hollow, and then set the ObjectId (which I'm already creating)? Then
> the custom batch faulter could resolve those, too.
Yet another place for me to provide probably-incorrect advice! :)
I was looking through the cayenne 1.1RC1 code today to see how I might go
about creating an EOGenericRecord-like object rather than a specific
instance, and came across just that very thing...
Take a look at "public DataObject DataContext.registeredObject(ObjectId
oid)."
It takes an ObjectID and creates a "hollow" object fault. Sounds ideal for
your situation.
-Mike
This archive was generated by hypermail 2.0.0 : Tue Oct 19 2004 - 17:30:41 EDT