<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-24611184.post134882963169416161..comments</id><updated>2010-02-04T12:53:10.572-08:00</updated><category term='xml'/><category term='scala'/><category term='podcast'/><category term='StAX'/><category term='java'/><category term='programming'/><category term='jdo'/><category term='socialnetworks'/><category term='gwt'/><category term='monitoring'/><category term='open source'/><category term='Thrift'/><category term='linkedin'/><category term='javaposse'/><category term='protobuf'/><category term='Google App Engine'/><category term='test'/><category term='guic'/><category term='guice'/><category term='ibm'/><category term='groovy'/><category term='spring'/><category term='twitter'/><category term='OHF'/><category term='Eclipse'/><category term='Mac'/><category term='voldemort'/><category term='kaching'/><category term='testing'/><category term='j2ee'/><category term='work'/><category term='conferences'/><category term='xstream'/><category term='json'/><category term='Books'/><title type='text'>Comments on Wondering around: Google App Engine Data Store Api is definitely bet...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.eishay.com/feeds/134882963169416161/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html'/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://4.bp.blogspot.com/_O9TJAb-LjDE/S44K61181wI/AAAAAAAAAj0/oYGO2xz_kf4/S220/eishay.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-24611184.post-8314660791015952883</id><published>2009-06-22T14:17:13.815-07:00</published><updated>2009-06-22T14:17:13.815-07:00</updated><title type='text'>I think the design is correct. get is used for loo...</title><content type='html'>I think the design is correct. get is used for looking up a known key. if the key doesnt exist, that is an exceptional situation. If you dont know if the key exist or not, you should write a query.&lt;br /&gt;&lt;br /&gt;Think of it as Map.apply in scala (which also throws an exception for unknown keys), and suddenly its starting to look quite good.&lt;br /&gt;&lt;br /&gt;Lacking a proper Option type in java, I very much prefer the explicit EntityNotFoundException over the dreaded NullpointerException.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/8314660791015952883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/8314660791015952883'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html?showComment=1245705433815#c8314660791015952883' title=''/><author><name>Jon-Anders Teigen</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html' ref='tag:blogger.com,1999:blog-24611184.post-134882963169416161' source='http://www.blogger.com/feeds/24611184/posts/default/134882963169416161' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1554631872'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-4034346068968063614</id><published>2009-06-22T13:31:06.884-07:00</published><updated>2009-06-22T13:31:06.884-07:00</updated><title type='text'>I wonder if it throwing an exception is anything t...</title><content type='html'>I wonder if it throwing an exception is anything to do with python dictionaries?  In python, if you attempt to access a non-existant key in a dictionary it throws an exception.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/4034346068968063614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/4034346068968063614'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html?showComment=1245702666884#c4034346068968063614' title=''/><author><name>Paul Kinlan</name><uri>http://www.blogger.com/profile/13277279448565336988</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html' ref='tag:blogger.com,1999:blog-24611184.post-134882963169416161' source='http://www.blogger.com/feeds/24611184/posts/default/134882963169416161' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1130197821'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-7881802590943892880</id><published>2009-06-22T13:03:57.083-07:00</published><updated>2009-06-22T13:03:57.083-07:00</updated><title type='text'>Very nice!
Thanks Daniel.</title><content type='html'>Very nice!&lt;br /&gt;Thanks Daniel.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/7881802590943892880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/7881802590943892880'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html?showComment=1245701037083#c7881802590943892880' title=''/><author><name>Eishay Smith</name><uri>http://www.blogger.com/profile/09443096006184006852</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://2.bp.blogspot.com/_O9TJAb-LjDE/SdlzHG9KSlI/AAAAAAAAAYc/kCnqSgnk0es/S220/n646386018_2207361_5928583.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html' ref='tag:blogger.com,1999:blog-24611184.post-134882963169416161' source='http://www.blogger.com/feeds/24611184/posts/default/134882963169416161' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1856236024'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-5716307146936690472</id><published>2009-06-22T11:43:47.408-07:00</published><updated>2009-06-22T11:43:47.408-07:00</updated><title type='text'>def exceptionToRight[T](f : =&amp;gt; T): Either[T,jav...</title><content type='html'>def exceptionToRight[T](f : =&amp;gt; T): Either[T,java.lang.RuntimeException] =&lt;br&gt;&lt;br /&gt;  try {&lt;br&gt;&lt;br /&gt;    Left(f)&lt;br&gt;&lt;br /&gt;  } catch {&lt;br&gt;&lt;br /&gt;    case ex =&amp;gt; Right(ex)&lt;br&gt;&lt;br /&gt;  }&lt;br&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;exceptionToRight(ds.get(queryKey)) match {&lt;br&gt;&lt;br /&gt;  case Right(_) =&amp;gt; { logger.info(&amp;quot;did not got it: &amp;quot; + queryKey.toString)&lt;br&gt;&lt;br /&gt;    ...&lt;br&gt;&lt;br /&gt;  }&lt;br&gt;&lt;br /&gt;  case Left(entity: Entity) if (null != entity) =&amp;gt; {&lt;br /&gt;logger.info(&amp;quot;got it: &amp;quot; + entity.toString)&lt;br&gt;&lt;br /&gt;    ...&lt;br&gt;&lt;br /&gt;  }&lt;br&gt;&lt;br /&gt;}&lt;br&gt;&lt;br /&gt;&lt;br /&gt;Doesn&amp;#39;t seem much worse.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/5716307146936690472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/5716307146936690472'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html?showComment=1245696227408#c5716307146936690472' title=''/><author><name>Daniel</name><uri>http://www.blogger.com/profile/07505997833685327219</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_vHc2CW-BnIc/SczHGsWJNGI/AAAAAAAAAJE/Qc61w-ONjZo/S220/03022009213.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html' ref='tag:blogger.com,1999:blog-24611184.post-134882963169416161' source='http://www.blogger.com/feeds/24611184/posts/default/134882963169416161' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-996413497'/></entry><entry><id>tag:blogger.com,1999:blog-24611184.post-8656120911268149765</id><published>2009-06-21T12:37:16.725-07:00</published><updated>2009-06-21T12:37:16.725-07:00</updated><title type='text'>I think this is a very &amp;quot;ActiveRecord&amp;quot; wa...</title><content type='html'>I think this is a very &amp;quot;ActiveRecord&amp;quot; way of doing things, where if you do a Model.find(nonexistent_key) it&amp;#39;ll throw a RecordNotFound exception. The reason that paradigm seems to work is specifically because the Rails framework provides some syntatically pleasant ways of handling exceptions for an entire group of methods or for globally handling an exception.&lt;br /&gt;&lt;br /&gt;Yeah, I can see why this sucks for GAE. I&amp;#39;m surprised there isn&amp;#39;t an option to throw an exception or return null on an invalid key. Next version, I guess.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/8656120911268149765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/24611184/134882963169416161/comments/default/8656120911268149765'/><link rel='alternate' type='text/html' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html?showComment=1245613036725#c8656120911268149765' title=''/><author><name>Ikai Lan</name><uri>http://www.blogger.com/profile/10396904220533470356</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.eishay.com/2009/06/google-app-engine-data-store-api-is.html' ref='tag:blogger.com,1999:blog-24611184.post-134882963169416161' source='http://www.blogger.com/feeds/24611184/posts/default/134882963169416161' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1883009123'/></entry></feed>
