Retrieving the ID of a newly stored item

2010-04-08 Thread David Sirland
I am using Restlet to be able to handle the data the same way in a 
GWT+Android+App engine project. On the app engine side of things I am using 
Objectify to store the instances in the datastore, which works like a charm, 
however I can't seem to figure out how to retrieve the ID of the created 
instances of my data. 

For instance on android, I create a new instance of the type Person, and set 
the name and surname, the Person class also has an ID, which will get auto 
generated by Objectify/Datastore once created on the serverside.

But how do I aquire the object _after_ I store it on the server? For instance 
my android code to store the object looks like this: 

// Initialize the resource proxy.
ClientResource cr = new ClientResource(url);
PersonResource resource = cr.wrap(PersonResource.class);

Person p = new Person(Firstname, LastName);
resource.store(p);

Which results in the server saving the resource in the database, and generating 
an ID for it aswell.

I can of course fetch the object again using retrieve, but since the ID is not 
accessible this won't work. 

I gather returning the object somehow is the way to go, but what is the best 
practise here?

Regards
David

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519696


They offer escort services in New York, and you can spend you night with hot and sexy New York escorts

2010-04-08 Thread webpost
It's been quite a long time, since the New York based escort girls have been in 
the scene and they have been catering A1 escort services to clients of all 
types.
 That's why they have been so successful and popular in the pleasure friendly 
crowd. 
 Payment for your girl can be done online instantly. So, you should not have 
any sort of issue regarding anything.
 Doing on work and not enjoying pleasures like kisses, touches and romance can 
make a person psychologically disturbed.
You can use New York independent Escort service for enjoying some time in the 
company of Bijou in New York.New York is the capital of West Bangal. With these 
girls, you will not feel you are getting some kind of service, the experience 
will be so real that it will almost like a real date. 
a href=http://bijouescorts.comNew York Escorts/a  A New York escort 
agency's website also allows you book your favorite girl at just a matter of 
few clicks. While making the booking, you need to specify whether you would be 
seeking for incall or outcall service. For outcall services, you may also need 
to mention your address where you want her service. Regarding the privacy and 
confidentiality of this, you need to be completely worry-free. As a service 
enjoyer, you just need to concentrate on your game. The rest will be all yours, 
all tempting! 

Adult escort services New York agencies are now increasing horizontally. Thanks 
to the immense support shown by the highly esteemed clients. Escort services 
enjoyers from all over the world have found New York the ultimate place to be 
and spend some memorable moments of life. If you have long been seeing those 
wildest of dreams but haven't been able to make it a reality, then visit New 
York once at least and see what's there special for you! You will never make a 
complaint for sure!
http://bijouescorts.com  Not to mention about the prime New York locations 
where these girls have their major service bases. Whether you want to visit any 
one of them in her luxury apartment or you want her to come to your place, you 
can enjoy whatever suits you the best. Also, you can take an escort girl to a 
hotel or to a resort where you can spend some quality time with her for a 
lifelong experience. All girls are expert at customer satisfaction and they can 
ignite any session with passion fire occupying every part of their sexy, 
curvaceous and sultry figures.

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519452


RE: Buy Generic ALEVE With No Prescription – Cheapest Prices

2010-04-08 Thread Thierry Boileau
Oops, I'm mistakenly approved this message.

Thierry Boileau

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519716


RE: They offer escort services in New York, and you can spend you night with hot and sexy New York escorts

2010-04-08 Thread Thierry Boileau
Oops, I've mistakenly approved this message.

Thierry Boileau

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519717


RE: Retrieving the ID of a newly stored item

2010-04-08 Thread David Sirland
Well, nevermind that, I just solved it by simply returning the object :). 
(Guess forgetting to deploy to app engine the changes you make is a dumb thing 
to forget)

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519774


RE: Retrieving the ID of a newly stored item

2010-04-08 Thread David Sirland
The GWT client however does not like being returned anything it seems, when I 
try to return the Object in question I get a GWT compilation error:

[INFO] Compiling module se.frojd.android.Person.Person
[INFO]Scanning for additional dependencies: 
file:/C:/Users/David/Documents/Projects-eclipse/Person/Person-gwt/src/main/java/se/frojd/android/Person/client/PersonApp.java
[INFO]   Adding '7' new generated units
[INFO]  Validating newly compiled units
[INFO] [ERROR] Errors in 
'generated://F3E3A777AF3AC3C8A8B893828F4B6A2E/se/frojd/android/Person/client/PersonResourceProxyProxy.java'
[INFO][ERROR] Line 43: The return type is incompatible with 
PersonResourceProxy.store(Person, ResultVoid)
[INFO]See snapshot: 
C:\Users\David\AppData\Local\Temp\PersonResourceProxyProxy2014780417928581067.java
[INFO]   [ERROR] Unable to find recently-generated type 
'se.frojd.android.Person.client.PersonResourceProxyProxy
[INFO][ERROR] Errors in 
'file:/C:/Users/David/Documents/Projects-eclipse/Person/Person-gwt/src/main/java/se/frojd/android/Person/client/PersonApp.java'

Is this a known issue?

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519791


RE: Retrieving the ID of a newly stored item

2010-04-08 Thread Thierry Boileau
Hello David,

I think you should update the method of the proxy:
from PersonResourceProxy.​store(Person, ResultVoid)
to PersonResourceProxy.​store(Person, ResultPerson)

As it returns a Person object, now.

Best regards,
Thierry Boileau

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519818


RE: Retrieving the ID of a newly stored item

2010-04-08 Thread David Sirland
Ah yes, but now I get this instead: 

[INFO]  Validating newly compiled units
[INFO] [ERROR] Errors in 
'generated://F3E3A777AF3AC3C8A8B893828F4B6A2E/se/frojd/android/Person/client/PersonResourceProxyProxy.java'
[INFO][ERROR] Line 18: The type PersonResourceProxyProxy must 
implement the inherited abstract method PersonResourceProxy.store(Person, 
ResultPerson)
[INFO][ERROR] Line 43: Name clash: The method store(Person, 
ResultVoid) of type PersonResourceProxyProxy has the same erasure as 
store(Person, ResultPerson) of type PersonResourceProxy but does not override 
it
[INFO]See snapshot: 
C:\Users\David\AppData\Local\Temp\PersonResourceProxyProxy4587954101559631058.java
[INFO]   [ERROR] Unable to find recently-generated type 
'se.frojd.android.Person.client.PersonResourceProxyProxy
[INFO][ERROR] Errors in 
'file:/C:/Users/David/Documents/Projects-eclipse/Person/Person-gwt/src/main/java/se/frojd/android/Person/client/PersonApp.java'
[INFO]   [ERROR]  Internal compiler error

Which happens if i use _any_ return type (I tried String, Long and a 
mockup-class aswell). GWT compiler does not seem to like this return?

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519841


RE: Retrieving the ID of a newly stored item

2010-04-08 Thread Thierry Boileau
Hi David,

you can also return the location of the created resource in the response: 
Representation#setLocationRef.

Best regards,
Thierry Boileau

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519843


RE: Retrieving the ID of a newly stored item

2010-04-08 Thread Thierry Boileau
Hi David,

at a first glance, I would that the compiler is just lost. Could you clean your 
project, maybe quit Eclipse and restart?

Best regards,
Thierry Boileau

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2519919


RE: Re: Internal Connector Error (1002) [GWT 2.0, restlet-gwt-2.0rc2]

2010-04-08 Thread Thierry Boileau
Hello,

such 405 error happens when the target resource does not implement the 
request's method. Is your resource designed to answer to GET requests?
What happens if you send a PUT request?

Best regards,
Thierry Boileau

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2522873


RE: Re: How to write an Universal redirector

2010-04-08 Thread Thierry Boileau
Hi,

I've entered a new RFE for this point :
http://restlet.tigris.org/issues/show_bug.cgi?id=1077

This is due to the request generated by the redirector.

Best regards,
Thierry Boileau

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2523593