No Valid findByPrimaryKey% Definitions in Remote Home Interface

This query determines all the Remote Home Interfaces that do not define a valid findByPrimaryKey% method.

Pre-packaged Query

Query name="Semmle/StyleChecks/J2EE/Remote Home Interface/A remote home interface must have a valid findByPrimaryKey(..) method definition"

Reports all Remote Home Interface types that do not define a findByPrimaryKey(..) method with one parameter and a non-void return type.

from RemoteEJBHomeInterface rhi
where not exists(Method m| m.hasName("findByPrimaryKey") and
rhi.inherits(m) and
m.getNumberOfParams() == 1 and not(m.getType().hasName("void"))) select rhi, rhi.toString() + " remote home interface must" + " define findByPrimaryKey(..)" + " method that has exactly one parameter and" + " does not have return type void"

References

Enterprise JavaBeans 2.1 - Specification, section 10.6.10 and 12.2.9

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

Comments
Only registered users can write comments!
 
Next >