Invalid Entity-Beans Modifiers |
This query determines all the entity-beans, with bean managed persistence, that have incorrect class modifiers.
Pre-packaged Query
Query name="Semmle/StyleChecks/J2EE/Entity-Bean/with Bean-Managed Persistence/All entity-beans must be public, not abstract and not final"
Reports all Entity-Bean types with bean managed persistence that are not public or that are abstract or final.
from EntityBean ebean
where not(ebean.hasModifier("public")) or ebean.hasModifier("abstract") or ebean.hasModifier("final")
select ebean, ebean.toString() + " entity-bean with bean managed"
+ " persistence must be public, not abstract and not final"
References
Enterprise JavaBeans 2.1 - Specification, section 12.2.2
|