private Number numberValueOf(Class<?> klazz, String value) {
        if (klazz.equals(long.class) || klazz.equals(Long.class)) {
            return Long.valueOf(value);
        }
        else if (klazz.equals(int.class) || klazz.equals(Integer.class)) {
            return Integer.valueOf(value);
        }
        else if (klazz.equals(byte.class) || klazz.equals(Byte.class)) {
            return Byte.valueOf(value);
        }
        throw new IllegalArgumentException("This method accepts only Integer/int, Long/long, or Byte/byte");
    }
Applies the criteria found in the {@link SearchCriteriaBean} to the JPA query.
@return
manager/api/jpa/src/main/java/io/apiman/manager/api/jpa/AbstractJpaStorage.java