code: private boolean isQueryBeanPackage(String domainPackage) {
      for (int i = 0; i < packages.length; i++) {
        if (domainPackage.startsWith(packages[i])) {
          return true;
        }
      }
      return false;
    }
docs: Check that the class is in an expected package (sub package of a package containing entity beans).