[appengine-java] Export to Excel

2011-01-24 Thread Aswath Satrasala
Hello,
My application design is GWT and Servlets.
I have the following situation in order to generate a report.
* Because of DeadlineExceeded exception in AppEngine server, I will not be
able to make one RPC call to fetch and aggregate the data and return to the
Client.
* Hence, I make few RPC calls from GWT using GWT timer and assemble the data
on the GWT client and render the report.
* Now,  the user clicks on 'Export' button, to export the data to Excel.
How do I export the data to Excel?

-Aswath
http://www.AccountingGuru.in

-- 
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: Export to Excel

2011-01-24 Thread Didier Durand
Hi,

You should read and follow the link here to go over the 30s limit and
keep thing simple for you user:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/42f1db6e64a8e2e2/cb8652a43a259b7b?lnk=gstq=blobstore+blob+trick#cb8652a43a259b7b

Another way to handle you case is to load your data from gae to a
spreadsheet in Google Docs via the the corresponding api and then
export to an xls file from doc if you really need(manually or via
API).
The spreadsheet api is described here: http://code.google.com/apis/spreadsheets/

hope it helps

regards

didier

On Jan 24, 12:51 pm, Aswath Satrasala aswath.satras...@gmail.com
wrote:
 Hello,
 My application design is GWT and Servlets.
 I have the following situation in order to generate a report.
 * Because of DeadlineExceeded exception in AppEngine server, I will not be
 able to make one RPC call to fetch and aggregate the data and return to the
 Client.
 * Hence, I make few RPC calls from GWT using GWT timer and assemble the data
 on the GWT client and render the report.
 * Now,  the user clicks on 'Export' button, to export the data to Excel.
 How do I export the data to Excel?

 -Aswathhttp://www.AccountingGuru.in

-- 
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: Changing logging .level does not affect logging

2011-01-24 Thread nacho
You have to 

1) enable loging in your WEB-INF/appengine-web.xml

system-properties
property name=java.util.logging.config.file 
value=WEB-INF/logging.properties/
  /system-properties

2) Set the logging level for your clasess in WEB-INF/logging.properties

com.mypackage.level=INFO

And I couldn't get it runnign with a previous release of the sdk than 1.4.0

-- 
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: Task Queue API Update

2011-01-24 Thread Simon Knott
As Fabrizio has mentioned, the API methods have changed.  However,
you're saying that you can get the code to compile and it's throwing
errors at runtime, which suggests that something has gone wrong with
your imports - are you including both the labs and the non-labs API
imports in the same class?

Simon

On Jan 23, 6:14 pm, Doug doug...@gmail.com wrote:
 Good Afternoon All,

  I am working to convert from the Task Queue Labs API to the non-labs API
 version.  I am finding it slightly more difficult than I initially
 anticipated.  It appears that how I was adding tasks to the queue is not
 compatible with the non-labs API.  If I just update the imports to bring in
 the new API I get the error “The method url(String) is undefined for the
 type TaskOptions.Builder”.  I  have provide some example of my code below,
 if anyone else has converted can you give me some guidance on what I am
 doing wrong?

 Current code, using the Labs API:
 *import* *com.google.appengine.api.labs.taskqueue.Queue*;
 *import* *com.google.appengine.api.labs.taskqueue.QueueFactory*;
 *import* *com.google.appengine.api.labs.taskqueue.TaskOptions*;
 *import* *com.google.appengine.api.labs.taskqueue.TaskOptions.Method*;
 *import* *com.google.appengine.api.labs.taskqueue.TaskOptions.Builder*.*;

 …

 Queue add_queue = QueueFactory.getQueue(add);
 …

 for (int i = 1; i  Item_counter; i++) {

 add_queue.add(TaskOptions.Builder.url(/add?item=+ItemURL[i]).method(Method.GET));

 }

 Code using the non-Labs API

 import com.google.appengine.api.taskqueue.Queue;
 import com.google.appengine.api.taskqueue.QueueFactory;
 import com.google.appengine.api.taskqueue.TaskOptions;
 import com.google.appengine.api.taskqueue.TaskOptions.Method;
 import static com.google.appengine.api.taskqueue.TaskOptions.Builder.*;

 TaskOptions TOdefault =
 com.google.appengine.api.taskqueue.TaskOptions.Builder.withDefaults();

 …

 for (int i = 1; i  Item_counter; i++) {

 TaskOptions TO = new TaskOptions(TOdefault);
             TO.url(/add);
             TO.param(item, itemURL[i]);
             TO.method(Method.GET);
             add_queue.add(TO);

 }

 The new code compiles and will “run”, but I get all kinds of null pointer
 exceptions from the tasks when they try to run.  If I switch back to the
 labs API it works perfectly.  Can anyone help me understand what I need to
 do to either get my original code to work with the new API and/or what I did
 incorrectly with the updated code?

 Thanks,
 Doug

-- 
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] Regarding docs upload in using gadget!

2011-01-24 Thread Dilip kumar
Hi,
I am new comer in google apps.
In one my requirements I need to design a sites that use gadget to
upload  create new docs(.doc,xls, .ppt)  doc template has one button
'new' (to create new doc)  content field.

home page has the following navigation

Home

by date

by owner

by label

when we click on home it should show all doc in content field with
column header like  when we click on the other it would be sorted by
that(like date, owner, label)

date   owner  title

date  time hereowner name  doc title



so doing the same thing what i need to use (which api ), doc,
authentication

I need authentication as well for all docs like reader, writer,  owner

so please any body can guide to do the same thing.

-- 
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: Task Queue API Update

2011-01-24 Thread Didier Durand
Hi,

Do you work on local dev server or on live infrastructure ?

Local dev servers requires additional jars to be included

regards

didier

On Jan 24, 12:02 pm, Simon Knott knott.si...@gmail.com wrote:
 As Fabrizio has mentioned, the API methods have changed.  However,
 you're saying that you can get the code to compile and it's throwing
 errors at runtime, which suggests that something has gone wrong with
 your imports - are you including both the labs and the non-labs API
 imports in the same class?

 Simon

 On Jan 23, 6:14 pm, Doug doug...@gmail.com wrote:

  Good Afternoon All,

   I am working to convert from the Task Queue Labs API to the non-labs API
  version.  I am finding it slightly more difficult than I initially
  anticipated.  It appears that how I was adding tasks to the queue is not
  compatible with the non-labs API.  If I just update the imports to bring in
  the new API I get the error “The method url(String) is undefined for the
  type TaskOptions.Builder”.  I  have provide some example of my code below,
  if anyone else has converted can you give me some guidance on what I am
  doing wrong?

  Current code, using the Labs API:
  *import* *com.google.appengine.api.labs.taskqueue.Queue*;
  *import* *com.google.appengine.api.labs.taskqueue.QueueFactory*;
  *import* *com.google.appengine.api.labs.taskqueue.TaskOptions*;
  *import* *com.google.appengine.api.labs.taskqueue.TaskOptions.Method*;
  *import* *com.google.appengine.api.labs.taskqueue.TaskOptions.Builder*.*;

  …

  Queue add_queue = QueueFactory.getQueue(add);
  …

  for (int i = 1; i  Item_counter; i++) {

  add_queue.add(TaskOptions.Builder.url(/add?item=+ItemURL[i]).method(Method.GET));

  }

  Code using the non-Labs API

  import com.google.appengine.api.taskqueue.Queue;
  import com.google.appengine.api.taskqueue.QueueFactory;
  import com.google.appengine.api.taskqueue.TaskOptions;
  import com.google.appengine.api.taskqueue.TaskOptions.Method;
  import static com.google.appengine.api.taskqueue.TaskOptions.Builder.*;

  TaskOptions TOdefault =
  com.google.appengine.api.taskqueue.TaskOptions.Builder.withDefaults();

  …

  for (int i = 1; i  Item_counter; i++) {

  TaskOptions TO = new TaskOptions(TOdefault);
              TO.url(/add);
              TO.param(item, itemURL[i]);
              TO.method(Method.GET);
              add_queue.add(TO);

  }

  The new code compiles and will “run”, but I get all kinds of null pointer
  exceptions from the tasks when they try to run.  If I switch back to the
  labs API it works perfectly.  Can anyone help me understand what I need to
  do to either get my original code to work with the new API and/or what I did
  incorrectly with the updated code?

  Thanks,
  Doug



-- 
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] Can't fetch a dataset using primary key

2011-01-24 Thread Ikai Lan (Google)
Try:

SELECT * from DB WHERE __key__ = KEY('1')

You can find more documentation on this here:

http://code.google.com/appengine/docs/python/datastore/gqlreference.html

--
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 Sun, Jan 23, 2011 at 2:00 PM, herber.m...@googlemail.com wrote:

 Hi all,

 I'm pretty new using GQL so hopefully someone can help me solving this easy
 (?) problem.

 I store my Entities in the DB using datastore.put( Entity ) without using
 an ID. But if I look at the Datastore Viewer I see that these entities are
 stored with an unique id called *ID/Name*. Now I'm trying to load such an
 entity using this code:

 SELECT * from DB WHERE ID/Name = 'id=1' - Error
 SELECT * from DB WHERE ID = 'id=1' - empty resultset
 SELECT * from DB WHERE Name = 'id=1' - empty resultset
 SELECT * from DB WHERE ID/Name = '1' - Error
 SELECT * from DB WHERE ID = '1' - empty resultset
 SELECT * from DB WHERE Name = '1' - empty resultset

 Can anybody tell me what to use to get this entry?

 Thanks in advance!

  --
 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: how to query TaskQueue for count of running/pending tasks?

2011-01-24 Thread Ikai Lan (Google)
This is the issue you want to star:

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

--
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 Sun, Jan 23, 2011 at 10:19 AM, Doug doug...@gmail.com wrote:


 There was another thread on this same topic a few months back.  I am not
 able to find it right now, but I believe that I remember that someone was
 using URL Fetch to fetch 
 https://appengine.google.com/queues?app_id=version_id=xx;
 and then parsing the page to determine the number of tasks on each queue.  I
 don't recall how they were handling authentication.

 Doug

 --
 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] Sample to read Log

2011-01-24 Thread Ikai Lan (Google)
I'm not aware of any log parsing libraries, though some users have reported
luck using Splunk:

http://www.splunk.com/

http://www.splunk.com/If you're going to write your own log parser, do
yourself a favor and don't do it in Java.

--
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, Jan 19, 2011 at 3:07 AM, Guillaume B.
guillaume.brus...@gmail.comwrote:

 Hello

 ./appengine-java-sdk/bin/appcfg.sh permits to extract log from an appengine 
 application
 and this shell call a java library gicen with the java appengine sdk

 does someone has already read logs directly in java using the sdk ?

 is there sample to do that

 the goal is to avoid to read logs in a flat file and after have to treat that 
 file
 I can rea log in java and do a direct treatment on that

 thanks


  --
 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] Can't fetch a dataset using primary key

2011-01-24 Thread Marc Herber
Thanks for your help. Unfortunatelly this syntax isn't working at all :(

I tried to run this statement within the datastore viewer but I get an error 
GQL Query.
Apart from that the link you posted is for python, but I would need it for 
java. Can you/anybody help me with that too?

Thanks in advance.

-- 
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] Can't fetch a dataset using primary key

2011-01-24 Thread Marc Herber
Meanwhile I tried this *java* code:
PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory( 
transactions-optional );
PersistenceManager pm = pmf.getPersistenceManager();
Antwort objectById = pm.getObjectById( Antwort.class, parameters.getLong( 
Constants.ID ) );

And this is my *jdocnfig.xml*:
?xml version=1.0 encoding=utf-8?
jdoconfig xmlns=http://java.sun.com/xml/ns/jdo/jdoconfig;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xsi:noNamespaceSchemaLocation=http://java.sun.com/xml/ns/jdo/jdoconfig;

   persistence-manager-factory name=transactions-optional
   
   property name=javax.jdo.PersistenceManagerFactoryClass 
value=org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory/
   property name=javax.jdo.option.ConnectionURL value=appengine/
   property name=javax.jdo.option.NontransactionalRead value=true/
   property name=javax.jdo.option.NontransactionalWrite 
value=true/
   property name=javax.jdo.option.RetainValues value=true/
   property name=datanucleus.appengine.autoCreateDatastoreTxns 
value=true/
   
   /persistence-manager-factory
   
/jdoconfig


But I get the subsequent exception:
javax.jdo.JDOFatalUserException: Application code attempted to create a 
PersistenceManagerFactory named transactions-optional, but one with this 
name already exists!  Instances of PersistenceManagerFactory are extremely 
slow to create and it is usually not necessary to create one with a given 
name more than once.  Instead, create a singleton and share it throughout 
your code.  If you really do need to create a duplicate 
PersistenceManagerFactory (such as for a unittest suite), set the 
appengine.orm.disable.duplicate.pmf.exception system property to avoid this 
error.

Can anybody help me out?!

-- 
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] Can't fetch a dataset using primary key

2011-01-24 Thread Stephen Johnson
Try changing Ikai's code to include the entity name like:

SELECT * from DB WHERE __key__ = KEY('DB','1')

if your key is a number then

SELECT * from DB WHERE __key__ = KEY('DB',1)

Documentation:

an entity key literal, with either a string-encoded
keyhttp://code.google.com/appengine/docs/python/datastore/keyclass.html#Keyor
a complete
path of kinds and key
names/IDshttp://code.google.com/appengine/docs/python/datastore/keysandentitygroups.html:


   - KEY('*encoded key*')
   - KEY('*kind*', *'name'/ID* [, '*kind*', *'name'/ID*...])



On Mon, Jan 24, 2011 at 3:14 PM, Marc Herber herber.m...@googlemail.comwrote:

 Thanks for your help. Unfortunatelly this syntax isn't working at all :(

 I tried to run this statement within the datastore viewer but I get an
 error GQL Query.
 Apart from that the link you posted is for python, but I would need it for
 java. Can you/anybody help me with that too?


 Thanks in advance.

 --
 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] Can't fetch a dataset using primary key

2011-01-24 Thread Stephen Johnson
Hi Marc,
As the error message says, you should use a singleton to share your
persistence manager. Your code must be allocating it more than once. Here ya
go:

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;
import javax.jdo.PersistenceManager;

final public class PMF {
private final static PersistenceManagerFactory pmf =
JDOHelper.getPersistenceManagerFactory(transactions-optional);

private PMF() {}

static public PersistenceManager getPersistenceManager() {
return pmf.getPersistenceManager();
}
}

Then to use it, just:

 PersistenceManager pm = PMF.getPersistenceManager();

Stephen

On Mon, Jan 24, 2011 at 3:19 PM, Marc Herber herber.m...@googlemail.comwrote:

 Meanwhile I tried this *java* code:
 PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory(
 transactions-optional );
 PersistenceManager pm = pmf.getPersistenceManager();
 Antwort objectById = pm.getObjectById( Antwort.class, parameters.getLong(
 Constants.ID ) );

 And this is my *jdocnfig.xml*:
 ?xml version=1.0 encoding=utf-8?
 jdoconfig xmlns=http://java.sun.com/xml/ns/jdo/jdoconfig;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:noNamespaceSchemaLocation=http://java.sun.com/xml/ns/jdo/jdoconfig
 

persistence-manager-factory name=transactions-optional

property name=javax.jdo.PersistenceManagerFactoryClass
 value=org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory/
property name=javax.jdo.option.ConnectionURL value=appengine/
property name=javax.jdo.option.NontransactionalRead
 value=true/
property name=javax.jdo.option.NontransactionalWrite
 value=true/
property name=javax.jdo.option.RetainValues value=true/
property name=datanucleus.appengine.autoCreateDatastoreTxns
 value=true/

/persistence-manager-factory

 /jdoconfig


 But I get the subsequent exception:
 javax.jdo.JDOFatalUserException: Application code attempted to create a
 PersistenceManagerFactory named transactions-optional, but one with this
 name already exists!  Instances of PersistenceManagerFactory are extremely
 slow to create and it is usually not necessary to create one with a given
 name more than once.  Instead, create a singleton and share it throughout
 your code.  If you really do need to create a duplicate
 PersistenceManagerFactory (such as for a unittest suite), set the
 appengine.orm.disable.duplicate.pmf.exception system property to avoid this
 error.

 Can anybody help me out?!

  --
 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: passing multiple parameters to JDOQL

2011-01-24 Thread Vik
anyone please some update on this? I am unable to find it by googling
either...

Thankx and Regards

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


On Sat, Jan 22, 2011 at 1:59 PM, Vik vik@gmail.com wrote:

 any help on this please as it is blocking us to effectively log the queries

 Thankx and Regards

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


 On Fri, Jan 21, 2011 at 9:47 AM, Vik vik@gmail.com wrote:

 Well That's fine But I would be more interested in logging the exact
 query fired by engine instead of separately printing individual stuff.

 The individual printing these elements this way is painful as well in the
 development process. So, any better way to print the query exactly fired by
 engine?


 Thankx and Regards

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


 On Fri, Jan 21, 2011 at 3:49 AM, A. Stevko andy.ste...@gmail.com wrote:

 re: how do i print the complete query executed in the logs when
 this approach is used?

 Simple. Print the query string and then print the parameters.


 On Thu, Jan 20, 2011 at 6:35 AM, Vik vik@gmail.com wrote:

 hie

 any updates on this please?

 Thankx and Regards

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


 On Wed, Jan 5, 2011 at 9:58 AM, Vik vik@gmail.com wrote:

 Hie

 Thanks..

 This worked for me. But how do i print the complete query executed in
 the logs when this approach is used?


 Thankx and Regards

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


 On Thu, Dec 30, 2010 at 9:43 PM, Yegor yegor.jba...@gmail.com wrote:

query.declareParameters(Long bind_pocId, Date bind_startDate,
 Date
  bind_endDate);

 This is correct. However, I personally prefer the shorter form, where
 instead of using filter column == alias along with
 query.declareParameters(Type alias) you just use filter column
 == :alias (note the colon before the alias name). Your query can be
 rewritten as follows:

 Query query = pm.newQuery(PocVacationSchedule.class);
 query.setFilter(pocId == :pi  startDate == :sd  endDate == :ed);
 ListPocVacationSchedule rulesList = (ListPocVacationSchedule)
 query.execute(pocId, startFrom, endFrom);

 --
 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.comgoogle-appengine-java%2bunsubscr...@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-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: passing multiple parameters to JDOQL

2011-01-24 Thread A. Stevko
Sorry Vik,
There is no single string created for prepared queries - the JDO2
standard dhttp://db.apache.org/jdo/api23/apidocs/index.htmloes
not allow for retrieving query information.
http://db.apache.org/jdo/api23/apidocs/javax/jdo/Query.html

Now if you were working with the low level database api, that Query has the
methods you are looking for
*Query.getFilterPredicateshttp://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.html#getFilterPredicates()
*()

Query.FilterPredicate.*getPropertyNamehttp://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.FilterPredicate.html#getPropertyName()
*()
*Query.FilterPredicate.getOperatorhttp://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.FilterPredicate.html#getOperator()
*()
*Query.FilterPredicate.getValuehttp://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.FilterPredicate.html#getValue()
*()



On Mon, Jan 24, 2011 at 10:04 PM, Vik vik@gmail.com wrote:

 anyone please some update on this? I am unable to find it by googling
 either...

 Thankx and Regards

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


 On Sat, Jan 22, 2011 at 1:59 PM, Vik vik@gmail.com wrote:

 any help on this please as it is blocking us to effectively log the
 queries

 Thankx and Regards

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


 On Fri, Jan 21, 2011 at 9:47 AM, Vik vik@gmail.com wrote:

 Well That's fine But I would be more interested in logging the exact
 query fired by engine instead of separately printing individual stuff.

 The individual printing these elements this way is painful as well in the
 development process. So, any better way to print the query exactly fired by
 engine?


 Thankx and Regards

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


 On Fri, Jan 21, 2011 at 3:49 AM, A. Stevko andy.ste...@gmail.comwrote:

 re: how do i print the complete query executed in the logs when
 this approach is used?

 Simple. Print the query string and then print the parameters.


 On Thu, Jan 20, 2011 at 6:35 AM, Vik vik@gmail.com wrote:

 hie

 any updates on this please?

 Thankx and Regards

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


 On Wed, Jan 5, 2011 at 9:58 AM, Vik vik@gmail.com wrote:

 Hie

 Thanks..

 This worked for me. But how do i print the complete query executed in
 the logs when this approach is used?


 Thankx and Regards

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


 On Thu, Dec 30, 2010 at 9:43 PM, Yegor yegor.jba...@gmail.comwrote:

query.declareParameters(Long bind_pocId, Date bind_startDate,
 Date
  bind_endDate);

 This is correct. However, I personally prefer the shorter form, where
 instead of using filter column == alias along with
 query.declareParameters(Type alias) you just use filter column
 == :alias (note the colon before the alias name). Your query can be
 rewritten as follows:

 Query query = pm.newQuery(PocVacationSchedule.class);
 query.setFilter(pocId == :pi  startDate == :sd  endDate ==
 :ed);
 ListPocVacationSchedule rulesList = (ListPocVacationSchedule)
 query.execute(pocId, startFrom, endFrom);

 --
 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.comgoogle-appengine-java%2bunsubscr...@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-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