code: public static Predicate anyBitsSet(final String expr, final long bits) {
          return new Predicate() {
              private String param;
              public void init(AbstractSqlCreator creator) {
                  param = creator.allocateParameter();
                  creator.setParameter(param, bits);
              }
              public String toSql() {
                  return String.format("(%s & :%s) > 0", expr, param);
              }
          };
      }
docs: Adds a clause that checks whether ANY set bits in a bitmask are present
  in a numeric expression.
  
  @param expr
  SQL numeric expression to check.
  @param bits
  Integer containing the bits for which to check.