Adding event handlers to domain classes.
向域类添加事件处理程序。
Move logic into domain classes or services.
把逻辑移到领域类或服务中。
Life cycle events of Grails domain classes.
Grails领域类的生命周期事件。
Notice that you must explicitly make domain classes searchable.
请注意:必须要显式地让domain类变成可搜索的。
Two domain classes, two controllers, and just over 250 lines of code.
两个domain类,两个控制器,刚刚超过250行代码。
Now that your domain classes and controllers are in place, start Grails.
现在域类和控制器类都已经就位,请启动Grails。
And finally, you'll explore the life cycle events of Grails domain classes.
最后,探讨Grails域类的生命周期事件。
Org.acme.membership.domain, which holds the JDO enhanced business domain classes.
它含有JDO增强的业务域类。
The sample code provided with this article demonstrates the use of these unified domain classes.
本文提供的示例代码将演示这些统一域类的使用。
Notice that these consist only of the application architecture's domain classes (the API layer).
注意,这些只包含应用程序架构的域类(api层)。
But the Searchable plug-in also does a bit of metaprogramming on your individual domain classes.
但Searchable插件也可以在您个人的域类上做一些元编程。
You use the active record pattern to wrap relational database persistence methods in domain classes.
活动记录模式则可用来在域类内包装关系数据库持久性方法。
To do this, you must add any state and relationships that the pattern requires to your domain classes.
为此,您必须将模式需要的所有状态和关系添加到域类中。
It gives you good examples of how to use the domain classes, as well as how to write a controller and a view.
它为您提供了如何使用域类以及如何编写控制器和视图的优秀示例。
The BusinessLib class library project contains simple domain classes, used as mere data transfer objects.
BusinessLib类库工程包含了简单的描述地域的类,这些类被当作纯粹的数据传输对象。
The columns in the airline, airport, and trip tables all match the fields in the corresponding domain classes.
airport和trip表中的所有列均与对应的域类中的字段匹配。
With Code First, rather than creating an EDM, you create your domain classes as you would for any other .
与程式码第一次,而非建立EDM 中,您建立您网域类别一样,任何其他。
Those methods are just a small sampling of the many dynamic methods that Grails provides for your domain classes.
这些方法只是Grails为你的领域对象所提供的众多动态方法的一小部分而已。
This setting allows you to have Grails update your database schema at runtime to synchronize it with your domain classes.
这个设置允许Grails在运行时使用你的领域对象同步更新数据库模式。
The subclasses are said to be domain classes because they provide wrappers to entities that exist in the application domain.
子类是域类,因为它们向存在于应用程序域内的实用工具提供了包装程序。
When it comes down to it I must be able to declare my domain classes in packages and the JetBrains plugin can't handle that.
当我使用Groovy插件的时候,我必须能够在包中声明我的领域类,然而JetBrains插件不能处理这个问题。
You might combine the presentation and domain layers in a single WAR file, or your domain classes might be in a separate EAR file.
可以将表示层和域层结合放到单个WAR文件中,或将域类单独放到一个EAR文件中。
The yellow box includes your domain classes, yet the Struts framework encourages you to extend from ActionForm for its helpful behavior.
黄色的方框包含了您的域类,但是Struts框架鼓励您扩展ActionForm 获得有用的行为。
Applying a pattern to your model involves mapping the generic roles in the pattern solution to specific domain classes within your model.
要将模式应用到模型,涉及到将模式解决方案中的通用规则映射到模型中特定的域类。
The SearchableService, as demonstrated in the preceding section, is great for doing site-wide searches across all of your domain classes.
正如在前一章节所展示的那样,SearchableService非常适合用来进行跨所有域类的站点级别的搜索。
You can easily test domain classes and services with a GrailsUnitTestCase, but testing a controller requires some additional functionality.
使用GrailsUnitTestCase,可以轻松测试域类和服务,但测试控制器还需要其他一些功能。
I'm used to adding static constraints blocks to my domain classes, so adding a static mapping block feels consistent with the rest of the framework.
我习惯将静态constraints块添加到域类,这样添加静态mapping块感觉起来和添加框架的其余部分是一致的。
The ObjectifyService object allows you to register domain classes, which of course you need to do before attempting to invoke their CRUD-like behavior.
ObjectifyService对象允许您注册域类,在尝试调用其crud类操作之前这当然是您需要做的。
The generic pattern behavior is defined (the template), with domain-specific behavior and state provided by domain classes (which provide the hooks).
将定义通用行为(模板),并提供域特定的行为和域类提供的状态(提供挂钩)。
AspectJ intertype declarations are used to automatically generate ID and version fields, and getters and setters for persistence fields in domain classes.
AspectJintertype声明用于自动生成id和版本字段,以及域类中持久化字段的getters和setters。
应用推荐