1

Doing full class name query with Objectify to get an Entity, is it possible? Like when I want to query for class com.mypackage.MyClass get the Entity and do further query on its fields.

EDIT:

For example:

daot.ofy().query(Class.forName("com.mypackage.MyClass"));

Will this work?

quarks
  • 33,478
  • 73
  • 290
  • 513
  • I'm afraid I really don't understand the question. Can you state it a little more clearly? Is it that you want to go from a classname in javascript to a query? If so, look at Class.forName() to get the class object. – stickfigure Sep 21 '12 at 20:34
  • Right Class.forName will do, but the problem is how to do the actual query via ofy(), for all registered classes I can simple do daot.ofy().query(getClassFromString("com.mypackage.MyClass")) – quarks Sep 22 '12 at 07:04

1 Answers1

1

The answer to your rephrased question is: Yes

stickfigure
  • 13,458
  • 5
  • 34
  • 50