Archived

This forum has been archived. Please start a new discussion on GitHub.

Querying Frozen Objects

I'm thinking about using Freeze Evictors to store the domain objects in my system. (domain objects in the context of 4 layer archutecture). I want to be able to provide general purpose searching of these objects.

For instance the user has a "find tool" and runs a search for all objects with:
3 < memberX < 10 and
100 < memberY < 105 or
5 < memberX < 20 and
200 < memberY < 205

Could I query the database directly to do this search, return the object ids then instantiate them and pass references to them to the user?

If I had indexes (section 26.5.6 of Ice doc) for various members I could get the objects that satisfied one of the query terms and then search through them one by one to find the ones that met the other requirements, this seems like a slow way to do it though.

Wouldn't it be cool if ICE provided a way to search through a freeze evictor by suppling an ideal object that you are looking for. There would be a way to specify the ranges for each member in the object and don't care members. This would be mapped to a database query by the freeze evictor and the return set of objects handed back.

Comments?

Cheers,
Felix