English 中文(简体)
Roo - add custom finder
原标题:
  • 时间:2010-01-15 23:11:46
  •  标签:
  • spring-roo

I used Roo to create a project that uses existing database. Im able to create dynamic finders, but I want to implement custom finder that will receive 4 parameters and use some of them to create Like condition and others for equals condition.

What is the best way to do this with Roo.

最佳回答

The recommended pattern is to edit the .java source file for your entity and define the new finder there. You might like to create a dynamic finder and then copy the style from the corresponding entityname_Roo_Finder.aj file. Please note manually-created finders do not appear in the automatically-created web scaffold (whereas dynamic finders will).

问题回答

You ll probably have to copy the entityManager()-Getter as in:

new DomainClass().entityManager;




相关问题
Why do I get a NullPointerException when initializing Spring

I ve got a problem running a batch job on my server, whereas it runs fine from Eclipse on my development workstation. I ve got my Spring environment set up using Roo, made an entity, and make a batch ...

Do aspects substitute repositories?

I started experimenting with Spring Roo just recently. It does a very nice job helping one build a domain model with integrated persistence rather quickly. As it adds persistence functionality in ...

Code Analysis Tools and Inter-Type-Declarations

I have a maven project generated by Spring Roo and use several tools (checkstyle, pmd etc.) to collect information about my project. (namely I am using codehaus sonar for this) Roo makes heavy use ...

Roo - add custom finder

I used Roo to create a project that uses existing database. Im able to create dynamic finders, but I want to implement custom finder that will receive 4 parameters and use some of them to create Like ...

Spring ROO like Console Application

I am looking to build a console driven application, which would somewhat like look like the Spring ROO Console, any ideas ?.

热门标签