/** * Factory to create a registration status query. * * <p> This method will create a new registration status query for a specific enrollment group on the 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}. * @param enrollmentGroupId the {@code String} that identifies the enrollmentGroup. It cannot be {@code null} or empty. * @return The {@link Query} iterator. */ public Query createEnrollmentGroupRegistrationStateQuery(QuerySpecification querySpecification, String enrollmentGroupId) { /* SRS_PROVISIONING_SERVICE_CLIENT_21_027: [The createEnrollmentGroupRegistrationStateQuery shall create a new deviceRegistrationState query by calling the createQuery in the registrationStatusManager.] */ return registrationStatusManager.createEnrollmentGroupQuery(querySpecification, enrollmentGroupId,0); }
/** * @deprecated As of release 1.0.0, replaced by {@link #createEnrollmentGroupRegistrationStateQuery(QuerySpecification, String)} ()} * @param querySpecification the {@link QuerySpecification} with the SQL query. It cannot be {@code null}. * @param enrollmentGroupId the {@code String} that identifies the enrollmentGroup. It cannot be {@code null} or empty. * @return The {@link Query} iterator. */ @Deprecated public Query createEnrollmentGroupRegistrationStatusQuery(QuerySpecification querySpecification, String enrollmentGroupId) { /* SRS_PROVISIONING_SERVICE_CLIENT_21_027: [The createEnrollmentGroupRegistrationStatusQuery shall create a new deviceRegistrationState query by calling the createQuery in the registrationStatusManager.] */ return registrationStatusManager.createEnrollmentGroupQuery(querySpecification, enrollmentGroupId,0); }
/** * Factory to create a registration status query. * * <p> This method will create a new registration status query for a specific enrollment group on the 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 #createIndividualEnrollmentQuery(QuerySpecification)}. * * @param querySpecification the {@link QuerySpecification} with the SQL query. It cannot be {@code null}. * @param enrollmentGroupId the {@code String} that identifies the enrollmentGroup. It cannot be {@code null} or empty. * @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 createEnrollmentGroupRegistrationStateQuery(QuerySpecification querySpecification, String enrollmentGroupId, int pageSize) { /* SRS_PROVISIONING_SERVICE_CLIENT_21_028: [The createEnrollmentGroupRegistrationStateQuery shall create a new deviceRegistrationState query by calling the createQuery in the registrationStatusManager.] */ return registrationStatusManager.createEnrollmentGroupQuery(querySpecification, enrollmentGroupId, pageSize); }
/** * @deprecated As of release 1.0.0, replaced by {@link #createEnrollmentGroupRegistrationStateQuery(QuerySpecification, String, int)} ()} * @param querySpecification the {@link QuerySpecification} with the SQL query. It cannot be {@code null}. * @param enrollmentGroupId the {@code String} that identifies the enrollmentGroup. It cannot be {@code null} or empty. * @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. */ @Deprecated public Query createEnrollmentGroupRegistrationStatusQuery(QuerySpecification querySpecification, String enrollmentGroupId, int pageSize) { /* SRS_PROVISIONING_SERVICE_CLIENT_21_028: [The createEnrollmentGroupRegistrationStatusQuery shall create a new deviceRegistrationState query by calling the createQuery in the registrationStatusManager.] */ return registrationStatusManager.createEnrollmentGroupQuery(querySpecification, enrollmentGroupId, pageSize); } }