-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Spring Roo 1.1 Cookbook
The finder list command shows the candidate dynamic finder method names whose implementations Roo can automatically generate. In this recipe, we will look at how to add dynamic finder methods to a persistent entity using the finder add command. As an example, we will add the findFlightsByDestinationLikeAndOriginLike method to a Flight entity.
Refer to the Viewing candidate dynamic finder methods recipe, to create the flight-app Roo project.
Start the Roo shell from the C:\roo-cookbook\ch03-recipes directory.
To add dynamic finder methods, follow the given steps:
Set the focus of subsequent commands on the Flight entity using a focus command:
roo> focus --class ~.domain.Flight
Add the findFlightsByDestinationLikeAndOriginLike dynamic finder method to the Flight entity using the finder add command:
.. roo> finder add findFlightsByDestinationLikeAndOriginLike Updated SRC_MAIN_JAVA\sample\roo\flightapp\domain\Flight.java...
Change the font size
Change margin width
Change background colour