[appengine-java] conceptual question: parent Key

2009-10-29 Thread K.Honsali

Salaam,

Using the low-level datastore api;

I have some resistance understanding the benefit of instantiating an
Entity with a parent Key.
Since I can just set a property , ParentId , with the desired issue.

Does BigTable ensure integrity constraints if I indicate the parent
Key using the former method?

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.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: conceptual question: parent Key

2009-10-29 Thread K.Honsali

typo: desired issue => desired value

On 29 oct, 11:58, "K.Honsali"  wrote:
> Salaam,
>
> Using the low-level datastore api;
>
> I have some resistance understanding the benefit of instantiating an
> Entity with a parent Key.
> Since I can just set a property , ParentId , with the desired issue.
>
> Does BigTable ensure integrity constraints if I indicate the parent
> Key using the former method?
>
> 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.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Datastore: is numeric ID unique for all entities of one type?

2009-11-17 Thread K.Honsali
As for your main question,
I assume  from the API  :: Key =   A datastore GUID. A Key instance
uniquely identifies an entity across all apps, and includes all
information necessary to fetch the entity from the datastore with
DatastoreService.get(Key).

you can get an entity by key:
 Entity get(Key key)
  Retrieves the Entity with the specified Key.

which is convertable to String using the KeyFactory's keyToString(Key
key) function
or convertable to  long using the Key getId()  func




On Nov 16, 4:46 am, elvin  wrote:
> Good day.
>
> As far as documentation states, "The key value includes the key of the
> entity group parent (if any) and either the app-assigned string ID or
> the system-generated numeric ID. To create the object with an app-
> assigned string ID, you create the Key value with the ID and set the
> field to the value. To create the object with a system-assigned
> numeric ID, you leave the key field null."
>
> Is this the id that can be accessed via Key#getId() call? I assume it
> is.
>
> My main question is: is this numeric ID guaranteed to be unique for
> all entities of the same type?
>
> If yes, how do you retrieve the entity using this id? I tried using
> PersistenceManager#getObjectById(), but it does not find my entity. I
> guess this is related to the fact that my entity is child in an entity
> group, thus its keys' string representation would not be "MyClass
> (10)" (which is created when I use KeyFactory to create key from an
> entity type and a numeric ID) but "MyParent(20)/MyClass(10)".
>
> Thanks in advance,
> Evgeny.

--

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=.




[appengine-java] on switching a webapp from RDBMS to GAE/J ( jdo, join, sql )

2009-11-25 Thread K.Honsali
Hi all,

If my understanding of previous discussions is correct, we can resume
from:
- GAE/J is not relational (not full JDO too), and hence does not
support sql features such as joins, like, not in ...etc
- the solution is to de-normalize your tables ... or your mind..

Now, suppose you have a quite big classic sql-based webapp which is
multi-layered like a burger, so it is OK to change the Data Access
Layer without affecting the other components, provided that the DAL
calls and outputs remain the same.
If you want to migrate this app to GAE/J, how would you do; knowing
that beside CRUD queries, you have queries that execute (on the fly w/
sql) up to a dozen joins ?
a )  re-write your DAL in GAE/J's JDO, by denormalizing your tables (&
your mind)
b )  write your own sql wrapper, using full JDO and the low level
datastore (can it be?)
c )  none of the above

Thanks for your CPU time :)

--

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: on switching a webapp from RDBMS to GAE/J ( jdo, join, sql )

2009-11-25 Thread K.Honsali
I would have added
d) use an embedded rdbms, and do own consistency

If there was a way to control running instances like in EC2



On Nov 25, 5:17 pm, "K.Honsali"  wrote:
> Hi all,
>
> If my understanding of previous discussions is correct, we can resume
> from:
> - GAE/J is not relational (not full JDO too), and hence does not
> support sql features such as joins, like, not in ...etc
> - the solution is to de-normalize your tables ... or your mind..
>
> Now, suppose you have a quite big classic sql-based webapp which is
> multi-layered like a burger, so it is OK to change the Data Access
> Layer without affecting the other components, provided that the DAL
> calls and outputs remain the same.
> If you want to migrate this app to GAE/J, how would you do; knowing
> that beside CRUD queries, you have queries that execute (on the fly w/
> sql) up to a dozen joins ?
> a )  re-write your DAL in GAE/J's JDO, by denormalizing your tables (&
> your mind)
> b )  write your own sql wrapper, using full JDO and the low level
> datastore (can it be?)
> c )  none of the above
>
> Thanks for your CPU time :)

--

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] [character encoding] request.setEncoding

2010-02-11 Thread K.Honsali
Salaam all;

Eclipse encoding is UTF-8 and HTML form charset is UTF-8.
Is it OK for this code below?

System.out.println("1-request char encoding :
"+request.getCharacterEncoding());
request.setCharacterEncoding("UTF-8");
System.out.println("2-request char encoding :
"+request.getCharacterEncoding());

executes like this:

1-request char encoding : null
2-request char encoding : null



I am trying to process arabic text as parameter coming from an html
form. The code worked fine in tomcat settings though...


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