First, I want to spend just a few minutes more on the domain model, however, so that I can introduce Objectify's features for indexing and caching. 但是,首先,我想在域模型上花费几分钟的时间,这样我可以介绍Objectify的用于索引和缓存的功能。
Objectify is our primary interface into the API and is exposed through the ofy method. Objectify是这个API的主要接口,它是通过ofy方法获取的。
Objectify also provides a find method, which instead returns null. Objectify还提供一个find方法,而该方法返回null。
I have produced my own set of high-level modules for dealing with XML called xml_pickle and xml_objectify. 我自行开发了处理XML的高级模块,称为xmlpickle和xmlobjectify。
Objectify doesn't auto-load domain classes& which means it doesn't scan your classpath for entities. Objectify不自动加载域类&这表示它不扫描实体的类路径。
On the whole, the Objectify API makes domain modeling for GAE easier and more intuitive, which is a boost to developer productivity. 总地来说,ObjectifyAPI使得针对GAE的域建模更加容易、直观,从而提高了开发人员的开发效率。
Object models such as lxml's objectify or Amara might be more natural for Python developers when speed is not a consideration. 如果不需要考虑速度的话,lxml的对象化或Amara等对象模型对于Python开发人员来说可能更自然。
In several previous articles, I have advocated the clarity and simplicity of my own Python xml_objectify module. 在前几篇文章中,我提倡我自己的Pythonxmlobjectify模块的清晰性和简明性。
I'm going to leave that to your imagination for now, though, and focus on one last requirement of working with Objectify: manually registering domain classes. 不过我打算暂时给您留有想象的余地,并专注于使用Objectify的最后一个要求:手动注册域类。
It shares many of the advantages of other native XML libraries I have written about in other installments: gnosis. xml. objectify, REXML, XML:: Grove, HaXml, and so on. 它具备了我在其他部分所讲述的XML原生库的许多优点:gnosis.xml.objectify、REXML、XML::Grove和HaXml,等等。
Notice Objectify's query code: the service instance supports filtering by property ( in this case owner) and even ordering the results. 注意Objectify的查询代码:service实例支持根据属性(在本例中是owner)过滤,甚至对结果进行排序。
Note that Objectify's query calls still hit the datastore; it's all other datastore interaction calls, like get, that leverage memcache. 请注意Objectify的query调用仍然针对数据存储;这就是利用了memcache的所有其他数据存储交互调用,如get。
In order to descend recursively and with ease through XML nodes, I utilized the high-level Pythonic interface provided by xml_objectify. 为了轻松地循环下降遍历XML节点,我利用了xmlobjectify提供的高级Python化的接口。
I'm done updating my domain objects, at least in terms of what I can do with Objectify. 至少在我对Objectify所能做的方面,我已经更新了我的域对象。
Note that I do not actually have to define getters and setters for this object to be utilized in Objectify ( though I'll need them if I want to access or set properties programmatically!). 注意,实际上我不必为这个对象定义getters和setters以便在Objectify中使用(不过如果我想通过编程方式访问或设置属性,我将会用到它们)。
Using gnosis. xml. objectify, I might write a filter-and-extract application as 如果使用gnosis.xml.objectify,我也许会这样编写一个“过滤和抽取”应用程序
I also explained Objectify's approach to relationships and demonstrated its query interface, which supports the GAE notions of filtering and sorting. 我还解释了针对关系的Objectify方法并展示其查询界面,其支持筛选和排序的GAE概念。
Objectify's use of Keys, rather than object references, reflects GAE's non-traditional datastore, which among other things lacks referential integrity. Objectify对Keys的使用,而非对象引用,反映了GAE的非传统数据存储,尤其缺乏参照完整性。
Now, what if we want to find our way down to the second person's city, as in the xml_objectify example? 现在,如果我们想要向下找到第二个人的城市,就象xmlobjectify示例中那样,应该怎么做呢?
Along with the xml_objectify, PYX, and HaXml options examined in earlier installments, Ruby programmers also have a quick way of processing XML without a steep learning curve. 连同前几篇文章中研究的xmlobjectify、PYX和HaXml选项一起,Ruby程序员还得到了一种处理XML的快速方法,而不必经历陡峭的学习曲线。
Objectify also permits relationships and exposes a query interface that supports the GAE notions of filtering and sorting. Objectify还允许关系,显示一个查询界面来支持GAE筛选和排序概念。
Another tendency is to objectify colleagues and close relationships. 另一个倾向是把同事和亲近的人物化。
No! I'm sensitive and I don't objectify women. 不是!我是敏感的人,而且从不把女人当玩物。
State representative Ellen Cohen, who sponsored the legislation, argued that connecting the two is fair because both strip clubs and sex crimes objectify women. 州议员ellencohen,是他发起了这部法律,辩论说两者之间的联系是公正的,因为脱衣舞俱乐部和性犯罪都把妇女物化了。
Not only that, you know you cannot'make'someone feel empowered or behave better, you can only help them objectify their own inner reality and hopefully make the necessary shifts. 不仅如此,你知道你不能“使”某人感觉被授权或者感觉良好。你只能帮助他们客观地认识自己的内在,希望能够完成必要的转变。
You really shouldn't objectify men like that, mia. 你不该把我具体化,米娅。
Thus, fantasy or fiction ( of which drama is one form) permits people to objectify their anxieties and fears, confront them, and fulfill their hopes in fiction if not fact. 因此,幻想和虚拟作品允许人们将他们的焦虑、恐惧具现化,并面对它们,同时满足在现实中不能满足的愿望。
You cannot objectify the inner portions of your own identity, and therefore you do not perceive them. 你不能将你自己身份的内在部分客观具体化,因而你感知不到它们。
We're, as a sport, harder to objectify and get down to numbers than baseball is. 这很醒目。作为一项体育运动,除了分析数据,我们很难做到很具体分析。