concept @query in category java

appears as: @Query
Spring Roo in Action

This is an excerpt from Manning's book Spring Roo in Action.

Roo implements the code for this method at runtime, based on the Spring Data @Query annotation. All parameters in the example above are defined using the @Param annotation, and the type returned is defined as the return type of the method, List<Registration>. Note that you’ve also passed the @Transactional annotation, and marked the query as a read-only transaction.

You can perform updates using the @Query method as well, as long as you mark the method as @Modifying: