此内容没有您所选择的语言版本。
12.2. Writing Seam applications in Groovy
Since Groovy objects are Java objects, any Seam component can be written and deployed with Groovy. You can also combine Groovy and Java classes in the same application.
12.2.1. Writing Groovy components 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
You will need to use Groovy 1.1 or higher to support annotations. The rest of this chapter shows how to use Groovy in a Seam application.
12.2.1.1. Entity 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Example 12.1. Using Groovy in a Seam Application
Since Groovy supports properties, there is no need to explicitly write verbose getters and setters. In the previous example, the hotel class can be accessed from Java as
hotel.getCity()
— the getters and setters are generated by the Groovy compiler. This makes the entity code very concise.