>> For you context-less collection of objects, get away from
EntityProxy equality semantics by wrapping/translating the objects in
a class that has the equality semantics that you define.
Building upon Robert's solution:
The process of adding and removing proxies to collections could be
'delegated' to a new class, which takes the 'collection' and a respective
'comparator implementation', for ex:
public class CollectionManager<T extends EntityProxy> {
void add(Collection<T> collection, T proxy, Comparator<T> comparator) {
// ... };
void remove(Collection<T> collection, T proxy, Comparator<T> comparator)
{ // ... };
}
I guess, in this case even proxies belonging to multiple contexts could be
maintained in the collection.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/lJkH9ocoaIoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.