I have many different Kinds in my app, they are unrelated in the Datastore, but they share a common Java base class which helps me process them generically. (By generically I mean without regard to their kind, not in the Java 'generics' sense.)
Now I want to perform some tests on one entity from each kind, and I can't figure out how to do it.
I want to do something like this:
Class<? extends MyBaseUnit> cl = getNextKind();
MyBaseUnit bu = (MyBaseUnit) ofy().load().type( cl ).filter( ?? ).first().now();
I don't think there is any such thing as a null filter, and if I just remove the filter() call then first() returns a Ref and I can't seem to do much with that.
I guess I could use a filter of ("id >", 0) for all the kinds with a long id, but what would a similar meaningless filter be for the ones with a string name?
Or maybe there is a better way of doing this? My ideal would be to retrieve a different entity every time I run the test.