Re: [appengine-java] Re: Subject: Java documentation updated to use low-level API for example code

2011-01-16 Thread Charms Styler
hmmm thnx. it certainly did the trick.but I couldn't find the maximum
length of a key? any ideas ?



On Fri, Jan 14, 2011 at 6:42 PM, Didier Durand durand.did...@gmail.com wrote:
 Hi,

 You may be interested to read to undertstand the structure of DS keys:
 http://code.google.com/appengine/articles/storage_breakdown.html#anc-entitiestable

 And, to answer your question, you can use key.getId() (see
 http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Key.html)
 on low-level api to retrieve the Long that you need for JPA

 regards

 didier

 On Jan 14, 1:59 pm, Charms Styler charmssty...@gmail.com wrote:
 Thanks. So it is possible to use both JPA  low level API.

 I tried it out , works like a charm but @ retrieval of specific object I ran
 into prob you see
 in my JPA, all my Entities are by long ID. How is possible for me to access
 id using Key ?  How may I refer keys using id  vice versa??

         @Id
 @GeneratedValue(strategy = GenerationType.IDENTITY)
 private Long id;

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine for Java group.
 To post to this group, send email to google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine-java?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Subject: Java documentation updated to use low-level API for example code

2011-01-16 Thread Didier Durand
Hi,

I don't know the exact answer to your question but what I can say is
that it is clearly dependent on your entity group hierarchy.

The key contains a concatenation of the key of all the ancestors.
I never saw any limitation on the depth of this ancestor hierarchy.

So, if you can be as deep as you want on ancestors, that means that
the length of key is not limited.

But, I guess we need confirmation from googlers on this one

regards

didier

On Jan 17, 7:23 am, Charms Styler charmssty...@gmail.com wrote:
 hmmm thnx. it certainly did the trick.but I couldn't find the maximum
 length of a key? any ideas ?

 On Fri, Jan 14, 2011 at 6:42 PM, Didier Durand durand.did...@gmail.com 
 wrote:
  Hi,

  You may be interested to read to undertstand the structure of DS keys:
 http://code.google.com/appengine/articles/storage_breakdown.html#anc-...

  And, to answer your question, you can use key.getId() (see
 http://code.google.com/appengine/docs/java/javadoc/com/google/appengi...)
  on low-level api to retrieve the Long that you need for JPA

  regards

  didier

  On Jan 14, 1:59 pm, Charms Styler charmssty...@gmail.com wrote:
  Thanks. So it is possible to use both JPA  low level API.

  I tried it out , works like a charm but @ retrieval of specific object I 
  ran
  into prob you see
  in my JPA, all my Entities are by long ID. How is possible for me to access
  id using Key ?  How may I refer keys using id  vice versa??

          @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  --
  You received this message because you are subscribed to the Google Groups 
  Google App Engine for Java group.
  To post to this group, send email to google-appengine-java@googlegroups.com.
  To unsubscribe from this group, send email to 
  google-appengine-java+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/google-appengine-java?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Subject: Java documentation updated to use low-level API for example code

2011-01-14 Thread Charms Styler
Thanks. So it is possible to use both JPA  low level API.  

I tried it out , works like a charm but @ retrieval of specific object I ran 
into prob you see
in my JPA, all my Entities are by long ID. How is possible for me to access 
id using Key ?  How may I refer keys using id  vice versa?? 

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Subject: Java documentation updated to use low-level API for example code

2011-01-14 Thread Didier Durand
Hi,

You may be interested to read to undertstand the structure of DS keys:
http://code.google.com/appengine/articles/storage_breakdown.html#anc-entitiestable

And, to answer your question, you can use key.getId() (see
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Key.html)
on low-level api to retrieve the Long that you need for JPA

regards

didier

On Jan 14, 1:59 pm, Charms Styler charmssty...@gmail.com wrote:
 Thanks. So it is possible to use both JPA  low level API.  

 I tried it out , works like a charm but @ retrieval of specific object I ran
 into prob you see
 in my JPA, all my Entities are by long ID. How is possible for me to access
 id using Key ?  How may I refer keys using id  vice versa??

         @Id
 @GeneratedValue(strategy = GenerationType.IDENTITY)
 private Long id;

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Subject: Java documentation updated to use low-level API for example code

2011-01-13 Thread Alexander Maslov
Thanks for updated Docs. AsyncDatastoreService is really nice thing to have. 
One question: how many concurent async operations are possible? Is there any 
limit?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Subject: Java documentation updated to use low-level API for example code

2011-01-13 Thread Ikai Lan (Google)
I believe the limit is 10 concurrent Async Datastore operations.

As far as transactions involving multiple entities, you could always do this
- they just have to be in the same entity group.

--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine



On Thu, Jan 13, 2011 at 4:37 AM, Alexander Maslov alexmas...@gmail.comwrote:

 Thanks for updated Docs. AsyncDatastoreService is really nice thing to
 have. One question: how many concurent async operations are possible? Is
 there any limit?

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Subject: Java documentation updated to use low-level API for example code

2011-01-13 Thread Alexander Maslov
A lot of people were talking about moving data from Master/Slave to HR 
taking to much time. I was thinking about usage of Async datastore calls to 
make things several times faster.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Subject: Java documentation updated to use low-level API for example code

2011-01-12 Thread Charms Styler
Hi Ikai, 
As for what I have come across so far, Low level Api is useful for 
performing  a transaction over multiple entities. However is it possible to 
use low level API as well as JPA or JDO ?   The idea is to use low level api 
whenever a need arises to perform a transaction over multiple entities, but 
I am not sure making entity groups using JPA Is doable? What's your say on 
this?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.