public FilterSubscription registerFilter(Query query, FilterCallback callback) {
if (!(query instanceof FilterQuery)) {
throw new IllegalArgumentException("The Query object must be created by a QueryFactory returned by this Matcher");
}
FilterQuery filterQuery = (FilterQuery) query;
return registerFilter(filterQuery.getJpqlString(), callback);
}