@Test void testCountQueryInvalid() { @SuppressWarnings("unchecked") Query<Entity> query = mock(Query.class); doThrow(mock(MolgenisValidationException.class)) .when(queryValidator) .validate(query, entityType); assertThrows( MolgenisValidationException.class, () -> queryValidationRepositoryDecorator.count(query)); }
@Override public long count(Query<E> q) { queryValidator.validate(q, getEntityType()); return super.count(q); }
QueryValidationRepositoryDecorator extends AbstractRepositoryDecorator<E> { @Override public long count(Query<E> q) { queryValidator.validate(q, getEntityType()); return super.count(q); } }
QueryValidationRepositoryDecorator extends AbstractRepositoryDecorator<E> { @Override public long count(Query<E> q) { queryValidator.validate(q, getEntityType()); return super.count(q); } QueryValidationRepositoryDecorator(
      Repository<E> delegateRepository,
      QueryValidator queryValidator,
      FetchValidator fetchValidator); }
QueryValidationRepositoryDecorator extends AbstractRepositoryDecorator<E> { @Override public long count(Query<E> q) { queryValidator.validate(q, getEntityType()); return super.count(q); } QueryValidationRepositoryDecorator(
      Repository<E> delegateRepository,
      QueryValidator queryValidator,
      FetchValidator fetchValidator); @Override long count(Query<E> q); @Override Stream<E> findAll(Query<E> q); @Override E findOne(Query<E> q); @Override void forEachBatched(Fetch fetch, Consumer<List<E>> consumer, int batchSize); @Override E findOneById(Object id, Fetch fetch); @Override Stream<E> findAll(Stream<Object> ids, Fetch fetch); }
QueryValidationRepositoryDecorator extends AbstractRepositoryDecorator<E> { @Override public long count(Query<E> q) { queryValidator.validate(q, getEntityType()); return super.count(q); } QueryValidationRepositoryDecorator(
      Repository<E> delegateRepository,
      QueryValidator queryValidator,
      FetchValidator fetchValidator); @Override long count(Query<E> q); @Override Stream<E> findAll(Query<E> q); @Override E findOne(Query<E> q); @Override void forEachBatched(Fetch fetch, Consumer<List<E>> consumer, int batchSize); @Override E findOneById(Object id, Fetch fetch); @Override Stream<E> findAll(Stream<Object> ids, Fetch fetch);  }