Implement predicates to query the database
Brought to you by:
olivier_smadja
implement Predicates the same way for example db4o has.
If you want to query database for some object, with predicates you implement interface :
boolean isMatch(MyClass candidate);
And you can write the query in plain, easy to understand Java. The engine might optimize the query, so it is not necessary to traverse through all object of given class. As I said, db4o already has that and it is a very powerful feature.