However JDO PersistenceManager and Query object are so complex. So I wrote an utility to use JDO easily. For example, you can search entities as follows instead of JDO Query object.
Listentries = JdoUtil.from(Entry.class) .filter("userId == ?") .ordering("updateDate desc") .range(0, 20) .getResultList(userId);
No need to cast result objects and Query#declareParameters() also.
I would like to provide this utility in the part of my NikoNiko Framework (NikoNiko means Smile in Japanese). NikoNiko Framework supports both standard JavaEE web development and Google App Engine for Java. It's small and lightweight. It would be suitable for the small web application development.
If you want to get even further with simplifying JDO usage, consider using Querydsl. In addition to JDO, Querydsl supports SQL, JPA and Java collections.
返信削除We are closely working with the JDO group to ensure that Querydsl is expressive as possible for JDOQL queries.
Thanks, I will check it!
返信削除However I'm assuming this utility are used in Google App Engine. I think Querydsl might be not able to work in Google App Engine.
I see no reasons why it wouldn't work. You can use both JPA and JDO as APIs for Querydsl.
返信削除I haven't tried it though.
Thanks Timo.
返信削除I didn't understand Querydsl well. I checked it and I think it's powerful solution on also Google App Engine to assemble query type safety and intuitive!
このコメントは投稿者によって削除されました。
返信削除Thanks Naoki.
返信削除If you end up using Querydsl feel free to contact me if you run into any troubles.
Our forum is also a good place to ask questions : Mysema Source forum