-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Spring Roo 1.1 Cookbook
When a persistent entity is created using Roo, a number of methods are auto-generated to simplify usage and testing of the entity. For instance, when the Flight entity was created in the Creating persistent entities recipe, the corresponding Flight_Roo_Entity.aj AspectJ ITD file was created with methods like persist, remove, merge, flush, findFlight, and so on.
In this recipe we'll look at how to control the generation of entity methods by:
Specifying the prefix to be used for a method
Instructing Roo not to generate a particular method
For the purpose of this recipe, we'll instruct Roo to do the following for the Flight entity:
Change the name of the persist auto-generated method to save
Change the name of the findFlight auto-generated method to finderForFlight
Don't generate countFlights and findFlightEntries methods
Exit the Roo shell and delete the contents of the C:\roo-cookbook\ch02-recipes directory.
Execute the ch02_jsr303_fields...
Change the font size
Change margin width
Change background colour