/** * Factory to create an enrollmentGroup query. * * <p> This method will create a new enrollment group query on Device Provisioning Service and return it as * a {@link Query} iterator. * * <p> The Device Provisioning Service expects a SQL query in the {@link QuerySpecification}, for instance * {@code "SELECT * FROM enrollments"}. * * @param querySpecification the {@link QuerySpecification} with the SQL query. It cannot be {@code null}. * @return The {@link Query} iterator. * @throws IllegalArgumentException if the provided parameter is not correct. */ public Query createEnrollmentGroupQuery(QuerySpecification querySpecification) { /* SRS_PROVISIONING_SERVICE_CLIENT_21_021: [The createEnrollmentGroupQuery shall create a new enrolmentGroup query by calling the createQuery in the enrollmentGroupManager.] */ return enrollmentGroupManager.createQuery(querySpecification, 0); }
/** * Factory to create an enrollmentGroup query. * * <p> This method will create a new enrollment group query on Device Provisioning Service and return it as * a {@link Query} iterator. * * <p> The Device Provisioning Service expects a SQL query in the {@link QuerySpecification}, for instance * {@code "SELECT * FROM enrollments"}. * * <p> For each iteration, the Query will return a List of objects correspondent to the query result. The maximum * number of items per iteration can be specified by the pageSize. It is optional, you can provide <b>0</b> for * default pageSize or use the API {@link #createEnrollmentGroupQuery(QuerySpecification)}. * * @param querySpecification the {@link QuerySpecification} with the SQL query. It cannot be {@code null}. * @param pageSize the {@code int} with the maximum number of items per iteration. It can be 0 for default, but not negative. * @return The {@link Query} iterator. * @throws IllegalArgumentException if the provided parameters are not correct. */ public Query createEnrollmentGroupQuery(QuerySpecification querySpecification, int pageSize) { /* SRS_PROVISIONING_SERVICE_CLIENT_21_022: [The createEnrollmentGroupQuery shall create a new enrolmentGroup query by calling the createQuery in the enrollmentGroupManager.] */ return enrollmentGroupManager.createQuery(querySpecification, pageSize); }