quarks
quarks

Reputation: 35346

Objectify entity

Can I pass an objectify entity (i.e class annotated by @Entity) to a function accepting com.google.appengine.api.datastore.Entity ?

Upvotes: 0

Views: 240

Answers (2)

Rick Mangi
Rick Mangi

Reputation: 3769

No, the entity annotation doesn't change the type of the object. There is no "getProperty" in objectify but you could certainly use reflection or commons BeanUtils to do a similar thing.

Upvotes: 0

stickfigure
stickfigure

Reputation: 13556

No. Java is a typed language. You can only pass subclasses of com.google.appengine.api.datastore.Entity to a function which accepts com.google.appengine.api.datastore.Entity. Anything else won't compile.

Upvotes: 2

Related Questions