No Valid ejbFindByPrimaryKey% Definitions in Entity-Beans

This query points out all the entity-beans, with bean managed persistence, that do not define a valid ejbFindByPrimaryKey% method.

Pre-packaged Query

Query name="Semmle/StyleChecks/J2EE/Entity-Bean/with Bean-Managed Persistence/An entity-bean class must have a valid ejbFindByPrimaryKey(..) method definition"

Reports all Entity-Bean types with bean managed persistence that do not define an ejbFindByPrimaryKey(..) method with one parameter and a non-void return type.

from EntityBean ebean
where not exists(Method m| m.hasName("ejbFindByPrimaryKey") and
ebean.inherits(m) and
m.getNumberOfParams() == 1 and not(m.getType().hasName("void"))) select ebean, ebean.toString() + " entity-bean must define" + " ejbFindByPrimaryKey(..) method with" + " exactly one parameter and a non-void return type"

References

Enterprise JavaBeans 2.1 - Specification, section 12.2.5

Digg!Reddit!Del.icio.us!Facebook!Slashdot!Technorati!StumbleUpon!Ma.gnolia!

Comments
Only registered users can write comments!
 
< Prev   Next >