Hi,
I'm using GDS 2.0 with Spring. I have a couple questions on externalizers. I
have some objects with very deep/extensive object graphs. For example, I may
load a Hibernate entity from the db. That entity points to a non-persistent
object, that association has many other associations of non-persistent objects
and so on. In other words, they are not lazy. I usually don't want this
massive amount of data to be brought over to Flex.
a) Is writing a customer externalizer the right approach to limiting how deep I
serialize the object graph?
b) There are many many cases where... for any given object... I want to see
some associations for some functions and other associations for other functions.
In other words, a single externalizer for a given class is usually not enough
for me. I need different externalizers for the same class for different
situations.
So the questions is, is it possible to specify an externalizer to use for a base
object on-the-fly?
I'm guessing the answer is no, it's not built in. But this is really a big deal
for me and am willing to build it myself.. if feasible.
What do you think? If it doesn't sound like a completely bonehead idea... then
I'm hoping someone could help me get started by just giving me a high-level
overview of where in the GDS code I should start.
Here's what I want to do.. when I make a call to the server via Flex/Tide, I
want to pass along some metadata with the request. This metadata tells me on
the server which externalizer(s) to use for the result objects. So I need to
figure out...
- How to pass this metadata (non-function parameters) with the Tide request from
Flex.
- How to access this metadata during the response phase (to determine which
externalizers to use)
- Where to cut in to override the default externalizer and use the requested
one(s).
If I could get those things answered (at least on a high level), then I think I
could be on my merry way.
This would be a huge boost for me. Thanks!!