[appengine-java] Users and UserService: fetch userID without login

2010-12-22 Thread l.denardo
Hello,
I'm trying to figure out possible solutions for a problem. I'm
currently using openID to authenticate users, restricting to Google as
an identity provider (both gmail and Google Apps).

What I need to do is to obtain reliable user information before a user
logs in to the application. Use case is simple:
*I want to make the app installable to a Google Apps domain (say for
the marketplace).
*During installation, domain admin logs in to my application, and I
retrieve domain's user list (tipically using Google Data java client
library)
*Domain admin configures roles for my application users (e.g. read
only or read/write access).

Obviously, no other user in the domain has logged in.
When the user logs in for the first time, I will have to apply correct
roles and permissions, as provided during configuration.

Best way to do this should be to access the unique userID provided by
UserService/User classes. According to documentation, this is the only
stable identifier for a given user.
So how is it possible to obtain it before the user logs in?
I tried to use User class constructor User(java.lang.String email,
java.lang.String authDomain), but this does not populate the ID. Is it
safe to save the object you obtain from such constructor, store it in
a temporary list, then compare it to the value returned by
userService.getCurrentUser() and apply roles accordingly?

Thanks for any help on this
Regards
Lorenzo

-- 
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-j...@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] Understanding gwt-dispatch and Singletons/member variables

2010-12-22 Thread Sky
Hi all,

I use gwt-dispatch in a project and now I have a question concerning
the gwt-dispatch framework and member variables in ActionHandlers.
I use guice on server side and bind the ActionHandlers as follow:
bindHandler(GetXYHandler.class);  <- this is per definition no
singleton!

In GetXYHandler I have a member variable, which stores the data
retrieved from Googles MemCacheService:
private Map cacheMap = new HashMap();

When making a server request in the execute method of GetXYHandler the
cacheMap is filled with objects, when a cache hit in memcache occurs  -
> the cacheMap member variable is not empty anymore!

My understanding of member variables (in example "cacheMap") is, that
they should be created new in each serverCall if they are not static.
In my case the cacheMap should be empty each time when the execute
method is called.
In my local tests the behaviour is somewhat different. When I test it
in debug modus locally (different user calls), the cacheMap stays
always filled like a static variable. Is this the normal behaviour of
member variables of Actionhandlers? My understanding would say this is
very curious, because its not a singleton?
If this is normal behaviour, no member variables could be used,
because they would not be synchronized...

Thanks for your help!

-- 
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-j...@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: Entity relationship designing - best practice

2010-12-22 Thread WillSpecht
http://www.google.com/events/io/2009/sessions/BuildingScalableComplexApps.html

this is a pretty good discussion on building apps that have lots of
child objects.  I also think you are prematurely optimizing.  How many
exams is a user going to have? 100, 200? This is still a tiny number
and if you went with RB's method or the one in the link I posted, you
have to run a separate query each time, which has its own costs.  I
think either way is fine until you start having users that have
thousands of exams.

On Dec 21, 3:05 am, Richard Berger  wrote:
> Har_Shan:
>
> I have been thinking about this topic also (but sadly, am not much of
> an expert).  I am using Objectify as a layer on top of the Datastore.
> Their website has a lot of good information on structuring data in the
> Datastore - seehttp://code.google.com/p/objectify-appengine/wiki/Concepts?tm=6
> ).
>
> There is also a good post on the various ways of handling 1 to many
> relationships using Objectify.  What appeared to be something that
> would work in your situation (which is like my situation) is what I
> think of as the "database approach".  What I mean by that is, if you
> had a 1 to many relationship, how would you model that in a database?
> Specifically if 1 User can have Many Exams, you would have...
>
> User table
> * userId
> * Other user fields
>
> Exam table
> * examId
> * userId
> * Other exam fields
>
> So, turning this into GWT/Objectify, it would be
>
> public class User  {
>   @Id private Long id;
>   // Other user fields
>
> }
>
> public class Exam{
>   @Id private Long id;
>   private Key userKey;
>   // Other exam fields
>
> }
>
> The way to find all the exams for a particular user (represented by
> "this") is:
>   Objectify ofy = ObjectifyService.begin();
>   Key userKey = new Key(User.class, this.id);
>   List result = ofy.query(Exam.class).filter("userKey",
> userKey).list();
>
> This is explained (much better than I could do) 
> at:http://code.google.com/p/objectify-appengine/wiki/IntroductionToObjec...
>
> This may not solve all (or any) of your use cases, but it has worked
> for me in my admittedly very limited usage.
> Also check 
> out:http://groups.google.com/group/objectify-appengine/browse_frm/thread/...
>
> Enjoy,
> RB
>
> On Dec 19, 12:17 am, Matej  wrote:
>
> > I am not expert in dataStore this is just what I would do:
> > Add new entity with fields:
> > ID OrderID UserID ExamID PageID QuestionID AnswerID
>
> > Yes it is a lot of redundant data, but simple.
> > When user starts new Exam, all data are created with AnswerID set to
> > general answer unAnswer. After that you just update AnswerID.
>
> > What are obstacle in design like this?
>
> > Best, M

-- 
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-j...@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] Workaround to get a cursor from a sorted and filtered query?

2010-12-22 Thread Glenn
I'm trying to find a workaround for some query cursor limitations.
Say that I have entities with date and an value which is a
multiple of ten from 0 to 100.

I need to get paginated entities sorted by date and with the
integer field above a given threshold, along the lines of the
pseudo code:

SELECT * FROM entity WHERE integer >= 50 ORDER BY date DESC

What's the best way to do this?  My thoughts are below.

As the docs say, I can't use an inequality on the integer field
since then I'd have to sort by the integer first.  Instead of using
integer values, I though Icould use strings: '0', '10', '20', etc.,
and
then use a query like this to get entities with a value of 70 or more:

SELECT * FROM entity WHERE integer IN [70,80,90] ORDER BY date DESC

But as the docs say, cursors can't be obtained from queries for
entities that use contains() (i.e., IN) or even disjunctions
(value == '70' || value == '80'...).

My question is would a multiple value property (a list) work for
this?  My idea is to set the all the values up to the true entity
value, e.g., if the entity value was '40', then the MVP would be
['0', '10', '20', '30', '40'].  Then if the threshold was 20,
then entities such as this would (I believe) be returned by a query
like

SELECT * FROM entity WHERE value == '20' ORDER BY date DESC

Can you obtain a cursor from such a query or is there a better way?

Thanks,
Glenn

-- 
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-j...@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] Retrieve GMAIL contacts

2010-12-22 Thread Ikai Lan (Google)
You might want to ask here:

http://groups.google.com/group/google-contacts-api

(Also, for future reference, a stack trace is helpful when asking for help)

--
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 Mon, Dec 13, 2010 at 10:57 PM, Moretto  wrote:

> Hi,
>
> Im'trying to read gmail contacts from my GAE APP. So the following
> class works fine at desktop app, but when i call "getEmails" method at
> my servlet a excpetion occurs. Seems like im not allowed to do it.
>
>
> /*
>  * To change this template, choose Tools | Templates
>  * and open the template in the editor.
>  */
> package com.appspot.kshare.control;
>
> import com.google.gdata.client.contacts.*;
> import com.google.gdata.data.contacts.*;
>
> import com.google.gdata.data.contacts.ContactFeed;
>
> import com.google.gdata.data.contacts.ContactEntry;
> import com.google.gdata.data.extensions.*;
> import com.google.gdata.util.AuthenticationException;
> import com.google.gdata.util.ServiceException;
> import java.io.IOException;
> import java.net.MalformedURLException;
> import java.net.URL;
> import java.util.ArrayList;
> import java.util.List;
>
> /**
>  *
>  * @author malacma
>  */
> public class ContactsControlUtil {
>
>public static List getEmails(String user, String senha)
> throws MalformedURLException, AuthenticationException, IOException,
> ServiceException {
>URL feedUrl = new URL("https://www.google.com/m8/feeds/
> contacts/default/full");
>ContactsService service = new ContactsService("Google-
> contactsExampleApp-1");
>service.setUserCredentials(user, senha);
>ContactFeed cf = service.getFeed(feedUrl, ContactFeed.class);
>
>
>List lEmails = new ArrayList();
>for (ContactEntry ce : cf.getEntries()) {
>//System.out.print(ce.toString());
>List lEmail = ce.getEmailAddresses();
>for (Email em : lEmail) {
>lEmails.add(em.getAddress());
>}
>}
>return lEmails;
>
>}
>public static  void main(String args[]) throws
> MalformedURLException, AuthenticationException, IOException,
> ServiceException{
>System.out.print(getEmails("mala...@gmail.com",
> ""));
>}
> }
>
> --
> 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-j...@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-j...@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] Sending email from Java dev server

2010-12-22 Thread Thomas Oldervoll
Is there a way to enable email sending for the AppEngine Java dev server? 
I've found instructions for 
Python,
 
but I can't figure out how to do this for the Jaav server - 
adding --enable_sendmail does not work.

Thomas

-- 
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-j...@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] Error in docs for Changing the Root Directory

2010-12-22 Thread Ikai Lan (Google)
Thanks! Will fix.


--
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 Mon, Dec 13, 2010 at 4:50 PM, Nevena  wrote:

> I just noticed there is an error in docs for Changing the Root
> Directory:
> Following example is provided:
> "/static"
> but you should omit double quotes:
> /static
> Just to mention in case anyone get stuck...
>
> --
> 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-j...@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-j...@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] NOT ABLE TO DEPLOY

2010-12-22 Thread Sumi
WHY DOES THIS HAPPEN OFTEN?
Unable to update app: Error posting to URL:
https://appengine.google.com/api/appversion/clonefiles?app_id=X&version=5&;
500 Internal Server Error



500 Server Error


Error: Server Error
The server encountered an error and could not complete your
request.If the problem persists, please http://code.google.com/appengine/community.html";>report your problem and
mention this error message and the query that caused it.




See the deployment console for more details
Unable to update app: Error posting to URL:
https://appengine.google.com/api/appversion/clonefiles?app_id=XXX&version=5&;
500 Internal Server Error



500 Server Error


Error: Server Error
The server encountered an error and could not complete your
request.If the problem persists, please http://code.google.com/appengine/community.html";>report your problem and
mention this error message and the query that caused it.



-- 
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-j...@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] NOT ABLE TO DEPLOY

2010-12-22 Thread Ikai Lan (Google)
We're looking into it:

http://code.google.com/p/googleappengine/issues/detail?id=4293

--
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 Wed, Dec 22, 2010 at 12:29 PM, Sumi  wrote:

> WHY DOES THIS HAPPEN OFTEN?
> Unable to update app: Error posting to URL:
> https://appengine.google.com/api/appversion/clonefiles?app_id=X&version=5&;
> 500 Internal Server Error
>
> 
> 
> 500 Server Error
> 
> 
> Error: Server Error
> The server encountered an error and could not complete your
> request.If the problem persists, please http://code.google.com/appengine/community.html";>report your problem
> and mention this error message and the query that caused it.
> 
> 
>
>
> See the deployment console for more details
> Unable to update app: Error posting to URL:
> https://appengine.google.com/api/appversion/clonefiles?app_id=XXX&version=5&;
> 500 Internal Server Error
>
> 
> 
> 500 Server Error
> 
> 
> Error: Server Error
> The server encountered an error and could not complete your
> request.If the problem persists, please http://code.google.com/appengine/community.html";>report your problem
> and mention this error message and the query that caused it.
> 
> 
>
>  --
> 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-j...@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-j...@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] GWT and GAE debugging problem

2010-12-22 Thread Ikai Lan (Google)
Have you asked your question here?

http://groups.google.com/group/Google-Web-Toolkit

--
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 Wed, Dec 15, 2010 at 10:06 AM, kidowell  wrote:

> Hey.
>
> Im starting with GAE, and im making an RCP program (a book address), on the
> server side I've got all the methods for manipulating the datastore (I'm
> using JPA), and on the client side I'm using GWT as a framework.
>
> When debugging it turns out, that I can only see the server side, and
> program never stops in any breakpoint on the client side.
>
> Is there any way that I can debug on both side sas the program runs.
> Because, just debugging on the server side is not very helpful.
>
> Thank you in advanced for your recomendation.
>
> Kido.
>
> --
> 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-j...@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-j...@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] com.google.appengine.api.datastore.Text does not preserve formatting

2010-12-22 Thread Ikai Lan (Google)
I'm pretty sure the formatting isn't being lost - HTML renders newlines and
spaces as a single space. You will need to preserve HTML formatting in your
final output.

You can test this by setting output content-type to "text/plain" and seeing
that line breaks and spaces are correctly saved.

--
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, Dec 16, 2010 at 11:16 AM, Ojasvi  wrote:

> Hi I am using Java + Jdo to store data. I am able to store Text. The text I
> get loses all its formatting ( new lines spaces are all converted to single
> space )
> is their any way to prevent the same ? I have read both the community and
> official FAQ and searched this group.
> Please help
>
> --
> 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-j...@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-j...@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] Users and UserService: fetch userID without login

2010-12-22 Thread Ikai Lan (Google)
Does a domain's user list contain an ID? We can't provide this ID to you
ahead of time.

I think for your use case, it's safe to use the email and handle the edge
case of someone changing their email.

--
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 Wed, Dec 22, 2010 at 2:27 AM, l.denardo wrote:

> Hello,
> I'm trying to figure out possible solutions for a problem. I'm
> currently using openID to authenticate users, restricting to Google as
> an identity provider (both gmail and Google Apps).
>
> What I need to do is to obtain reliable user information before a user
> logs in to the application. Use case is simple:
> *I want to make the app installable to a Google Apps domain (say for
> the marketplace).
> *During installation, domain admin logs in to my application, and I
> retrieve domain's user list (tipically using Google Data java client
> library)
> *Domain admin configures roles for my application users (e.g. read
> only or read/write access).
>
> Obviously, no other user in the domain has logged in.
> When the user logs in for the first time, I will have to apply correct
> roles and permissions, as provided during configuration.
>
> Best way to do this should be to access the unique userID provided by
> UserService/User classes. According to documentation, this is the only
> stable identifier for a given user.
> So how is it possible to obtain it before the user logs in?
> I tried to use User class constructor User(java.lang.String email,
> java.lang.String authDomain), but this does not populate the ID. Is it
> safe to save the object you obtain from such constructor, store it in
> a temporary list, then compare it to the value returned by
> userService.getCurrentUser() and apply roles accordingly?
>
> Thanks for any help on this
> Regards
> Lorenzo
>
> --
> 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-j...@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-j...@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] low-lewel put method outside of a transaction

2010-12-22 Thread Stephen Johnson
You might want to take a look at CommittedButStillApplyingException

On Tue, Dec 21, 2010 at 1:08 PM, ss.require  wrote:

> Please, help!
> According to this:
> http://code.google.com/intl/uk-UA/appengine/articles/life_of_write.html.
>
> Let's suppose that I call the low-level put method outside of a
> transaction and an exception throws. If exception occures at the
> commit phase entity won't be saved otherwise if exception occures at
> the applyed phase entity will be saved.
>
> Is there a way to find out entity is really saved or not in the
> datastore after exception?
>
> If I execute the same operation inside a transaction, for exampe:
> Transaction tx = datastore.beginTransaction();
> try {
>   put entity code ...
>  tx.commit();
> } finally {
>  if (tx.isActive()) {
>tx.rollback();
> }
> Suppose exception occures in the apply phase, then  tx.rollback() will
> be fired? Can it make sure that enitty really won't be saved in the
> datastore?
>
> --
> 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-j...@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-j...@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] com.google.appengine.api.datastore.Text does not preserve formatting

2010-12-22 Thread ojasvi rajpal
Hi ,
Sorry for the trouble,
U are right , I found that shortly after posting and hence deleted teh post
after few hours.
Will try and be more careful next time.
thanks
Ojasvi Rajpal

On Thu, Dec 23, 2010 at 2:13 AM, Ikai Lan (Google)

> wrote:

> I'm pretty sure the formatting isn't being lost - HTML renders newlines and
> spaces as a single space. You will need to preserve HTML formatting in your
> final output.
>
> You can test this by setting output content-type to "text/plain" and seeing
> that line breaks and spaces are correctly saved.
>
> --
> 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, Dec 16, 2010 at 11:16 AM, Ojasvi  wrote:
>
>> Hi I am using Java + Jdo to store data. I am able to store Text. The text
>> I get loses all its formatting ( new lines spaces are all converted to
>> single space )
>> is their any way to prevent the same ? I have read both the community and
>> official FAQ and searched this group.
>> Please help
>>
>> --
>> 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-j...@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-j...@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-j...@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: Cant retrieve a list of objects when using GAE and JPA.

2010-12-22 Thread Cesar Ruiz
Hey can you please explaine me the DTO way, with some code or an example, I
really need to retrieve those objects. Thank you in advanced.

Kido.

On 21 December 2010 20:18, Stevko  wrote:

> I may be dated on this with not keeping up on the latest gwt advances.
> The problems is a JPA or JDO augmented class is not directly
> portable (serialize/deserialize)  from the GAE/J class to a GWT/js class
> like non-persistent classes are.
>
> The classic DTO case (and not elegant) is to copy+paste your persistent
> classes into a shared model w/o the database twist and write the
> transporters.
> Many folks today have decided to skip the JPA layer and use Objectify for
> GAE database access. Its led to less headaches for some bloggers.
>
>
>
>
>  --
> 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-j...@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.
>



-- 
Cesar Ruiz.

-- 
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-j...@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: Cant retrieve a list of objects when using GAE and JPA.

2010-12-22 Thread A. Stevko
Data Transfer Object (DTO) pattern is explained in this page
http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html

The
Sample Code Implementing the Transfer Object Pattern
gives a pretty clear explanation of how to implement the pattern (substitute
JDO object for EntityBean) .

On Wed, Dec 22, 2010 at 3:34 PM, Cesar Ruiz  wrote:

> Hey can you please explaine me the DTO way, with some code or an example, I
> really need to retrieve those objects. Thank you in advanced.
>
> Kido.
>
>
> On 21 December 2010 20:18, Stevko  wrote:
>
>> I may be dated on this with not keeping up on the latest gwt advances.
>> The problems is a JPA or JDO augmented class is not directly
>> portable (serialize/deserialize)  from the GAE/J class to a GWT/js class
>> like non-persistent classes are.
>>
>> The classic DTO case (and not elegant) is to copy+paste your persistent
>> classes into a shared model w/o the database twist and write the
>> transporters.
>> Many folks today have decided to skip the JPA layer and use Objectify for
>> GAE database access. Its led to less headaches for some bloggers.
>>
>>
>>
>>
>>  --
>> 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-j...@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.
>>
>
>
>
> --
> Cesar Ruiz.
>
>  --
> 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-j...@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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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-j...@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: how to access all values a property has?

2010-12-22 Thread jacek.ambroziak
Thank you for answering.
Indeed, I do keep a "running count"
and I use MapRed to compute the extent of a property (of a kind).

Recently I watched again the Google I/O video w/ Brett Slatkin
where he talks about self-join, and the zig-zag algorithm
in about minute 27 into that video.
Indexes need to store all values, and ordered as well.
Depending on index table implementation it could be easy
to retrieve the set of values.

It is not a very big deal -- just wanted to avoid maintaining extents
explicitly.


On Dec 21, 1:38 pm, "Ikai Lan (Google)" 
wrote:
> No, we can't know all possible values without traversing the entire index.
> Your best bet is to keep a "running count" - when someone enters a new
> color, save it. If you need to generate this data based on existing
> properties, I would suggest appengine-mapreduce 
> (http://code.google.com/p/appengine-mapreduce).
>
> --
> 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 Tue, Dec 21, 2010 at 9:22 AM, jacek.ambroziak
> wrote:
>
>
>
>
>
>
>
> > Say, I have a set of Person Entities with List favoriteColor
> > property.
> > People can specify their own sets of colors for that property.
>
> > Can I access the union of these color sets, ie. all the values they have
> > entered
> > for this property? The values should sit in the DataStore index, ordered,
> > but can we access such data?
>
> > --
> > 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-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com > 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-j...@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] Issues redirecting to domain

2010-12-22 Thread Vik
Hie

Our app is at: http://2.latest.sakshumweb.appspot.com/

And we have added our domain http://www.sakshum.com   This was all working
fine from last 6+ months. But from yesterday http://www.sakshum.com fails to
load the app. It says browser could not find the page.

We havent done any changes from our site and our NGO is suffering heavily
because of this.


Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com

-- 
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-j...@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] Issues redirecting to domain

2010-12-22 Thread A. Stevko
Both urls work the same for me.
Downforeveryoneorjustme says its up too
http://www.downforeveryoneorjustme.com/www.sakshum.com


On Wed, Dec 22, 2010 at 8:55 PM, Vik  wrote:

> Hie
>
> Our app is at: http://2.latest.sakshumweb.appspot.com/
>
> And we have added our domain http://www.sakshum.com   This was all working
> fine from last 6+ months. But from yesterday http://www.sakshum.com fails
> to load the app. It says browser could not find the page.
>
> We havent done any changes from our site and our NGO is suffering heavily
> because of this.
>
>
> Thankx and Regards
>
> Vik
> Founder
> www.sakshum.com
> www.sakshum.blogspot.com
>
> --
> 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-j...@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.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

-- 
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-j...@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: Any easy way to run demos on 1.4 release?

2010-12-22 Thread NeoK
I've already installed Eclipse plugin and imported project with "Eclipse 
File->New->Java Project from Ant Buildfile". As far as I know the demos 
under *
\eclipse\plugins\com.google.appengine.eclipse.sdkbundle.1.4.0_1.4.0.v201012021502\appengine-java-sdk-1.4.0\demos
* folder don't have the eclipse project file except the "sticky" demo.
Anyway, I gave up trying those demos. Rather than that I found *
\eclipse\plugins\com.google.gwt.eclipse.sdkbundle.2.1.1_2.1.1.v201012170127\gwt-2.1.1\samples
* works fine with the given Ant build.xml file. "ShowCase" and "Mail" are 
great for me although I wanted to see how JDO works in GAE demos not in GWT.

-- 
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-j...@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.