@Test public void retrieveObjectsForPageableOutOfRange() { Optional<BasicUser> user = repo.findById(1L); assertThat(user.isPresent()).isFalse(); }
@Nonnull @Override public Optional<T> findById(@Nonnull final ID id) { return Optional.ofNullable(operations.findById(domainClass, id)); }
SimpleRequeryRepository implements RequeryRepositoryImplementation<T, ID> { @Nonnull @Override public Optional<T> findById(@Nonnull final ID id) { return Optional.ofNullable(operations.findById(domainClass, id)); } }
SimpleRequeryRepository implements RequeryRepositoryImplementation<T, ID> { @Nonnull @Override public Optional<T> findById(@Nonnull final ID id) { return Optional.ofNullable(operations.findById(domainClass, id)); } SimpleRequeryRepository(@Nonnull final RequeryEntityInformation<T, ID> entityInformation,
                                   @Nonnull final RequeryOperations operations); }
SimpleRequeryRepository implements RequeryRepositoryImplementation<T, ID> { @Nonnull @Override public Optional<T> findById(@Nonnull final ID id) { return Optional.ofNullable(operations.findById(domainClass, id)); } SimpleRequeryRepository(@Nonnull final RequeryEntityInformation<T, ID> entityInformation,
                                   @Nonnull final RequeryOperations operations); @Override void setRepositoryMethodMetadata(@Nullable final CrudMethodMetadata crudMethodMetadata); @Transactional @Override @Nonnull S insert(@Nonnull final S entity); @Transactional @Override @Nonnull K insert(@Nonnull final S entity, @Nonnull final Class<K> keyClass); @Transactional @Override @Nonnull List<S> insert(@Nonnull final Iterable<S> entities); @Transactional @Override @Nonnull List<K> insert(@Nonnull final Iterable<S> entities, @Nonnull final Class<K> keyClass); @Transactional @Override @Nonnull S upsert(@Nonnull final S entity); @Transactional @Override @Nonnull List<S> upsertAll(@Nonnull final Iterable<S> entities); @Nonnull S refresh(@Nonnull final S entity); @SuppressWarnings({ "unchecked", "NullableProblems" }) @Nonnull List<S> refresh(@Nonnull final Iterable<S> entities, final Attribute<S, ?>... attributes); @Nonnull S refreshAll(@Nonnull final S entity); @Transactional @Override void deleteInBatch(@Nonnull final Iterable<T> entities); @Transactional @Override int deleteAllInBatch(); @Override T getOne(@Nonnull final ID id); @Nonnull @Override List<T> findAll(@Nonnull final Sort sort); @SuppressWarnings("unchecked") @Nonnull @Override Page<T> findAll(@Nonnull final Pageable pageable); @Transactional @Nonnull @Override S save(@Nonnull final S entity); @Transactional @Nonnull @Override List<S> saveAll(@Nonnull final Iterable<S> entities); @Nonnull @Override Optional<T> findById(@Nonnull final ID id); @SuppressWarnings("unchecked") @Override boolean existsById(@Nonnull final ID id); @Nonnull @Override List<T> findAll(); @SuppressWarnings("unchecked") @Nonnull @Override List<T> findAllById(@Nonnull final Iterable<ID> ids); @Override long count(); @SuppressWarnings("unchecked") @Transactional @Override void deleteById(@Nonnull final ID id); @Transactional @Override void delete(@Nonnull final T entity); @Transactional @Override void deleteAll(@Nonnull final Iterable<? extends T> entities); @Transactional @Override void deleteAll(); @Nonnull @Override Optional<S> findOne(@Nonnull final Example<S> example); @SuppressWarnings("unchecked") @Nonnull @Override List<S> findAll(@Nonnull final Example<S> example); @SuppressWarnings("unchecked") @Nonnull @Override List<S> findAll(@Nonnull final Example<S> example, @Nonnull final Sort sort); @SuppressWarnings("unchecked") @Nonnull @Override Page<S> findAll(@Nonnull final Example<S> example, @Nonnull final Pageable pageable); @SuppressWarnings("unchecked") @Override long count(@Nonnull Example<S> example); @SuppressWarnings("unchecked") @Override boolean exists(@Nonnull Example<S> example); @Nonnull @Override Optional<T> findOne(@Nonnull final Return<? extends Result<T>> whereClause); @Nonnull @Override List<T> findAll(@Nonnull final Return<? extends Result<T>> whereClause); @SuppressWarnings("unchecked") @Nonnull @Override Page<T> findAll(@Nonnull final QueryElement<? extends Result<T>> whereClause,
                           @Nonnull final Pageable pageable); @SuppressWarnings("unchecked") @Nonnull @Override List<T> findAll(@Nonnull final Iterable<Condition<T, ?>> conditions,
                           @Nonnull final Sort sort); @SuppressWarnings("unchecked") @Nonnull @Override List<T> findAll(@Nonnull final Iterable<Condition<T, ?>> conditions); @SuppressWarnings("unchecked") @Override int count(@Nonnull final QueryElement<? extends Result<T>> whereClause); @Override boolean exists(@Nonnull final QueryElement<? extends Result<T>> whereClause); }
SimpleRequeryRepository implements RequeryRepositoryImplementation<T, ID> { @Nonnull @Override public Optional<T> findById(@Nonnull final ID id) { return Optional.ofNullable(operations.findById(domainClass, id)); } SimpleRequeryRepository(@Nonnull final RequeryEntityInformation<T, ID> entityInformation,
                                   @Nonnull final RequeryOperations operations); @Override void setRepositoryMethodMetadata(@Nullable final CrudMethodMetadata crudMethodMetadata); @Transactional @Override @Nonnull S insert(@Nonnull final S entity); @Transactional @Override @Nonnull K insert(@Nonnull final S entity, @Nonnull final Class<K> keyClass); @Transactional @Override @Nonnull List<S> insert(@Nonnull final Iterable<S> entities); @Transactional @Override @Nonnull List<K> insert(@Nonnull final Iterable<S> entities, @Nonnull final Class<K> keyClass); @Transactional @Override @Nonnull S upsert(@Nonnull final S entity); @Transactional @Override @Nonnull List<S> upsertAll(@Nonnull final Iterable<S> entities); @Nonnull S refresh(@Nonnull final S entity); @SuppressWarnings({ "unchecked", "NullableProblems" }) @Nonnull List<S> refresh(@Nonnull final Iterable<S> entities, final Attribute<S, ?>... attributes); @Nonnull S refreshAll(@Nonnull final S entity); @Transactional @Override void deleteInBatch(@Nonnull final Iterable<T> entities); @Transactional @Override int deleteAllInBatch(); @Override T getOne(@Nonnull final ID id); @Nonnull @Override List<T> findAll(@Nonnull final Sort sort); @SuppressWarnings("unchecked") @Nonnull @Override Page<T> findAll(@Nonnull final Pageable pageable); @Transactional @Nonnull @Override S save(@Nonnull final S entity); @Transactional @Nonnull @Override List<S> saveAll(@Nonnull final Iterable<S> entities); @Nonnull @Override Optional<T> findById(@Nonnull final ID id); @SuppressWarnings("unchecked") @Override boolean existsById(@Nonnull final ID id); @Nonnull @Override List<T> findAll(); @SuppressWarnings("unchecked") @Nonnull @Override List<T> findAllById(@Nonnull final Iterable<ID> ids); @Override long count(); @SuppressWarnings("unchecked") @Transactional @Override void deleteById(@Nonnull final ID id); @Transactional @Override void delete(@Nonnull final T entity); @Transactional @Override void deleteAll(@Nonnull final Iterable<? extends T> entities); @Transactional @Override void deleteAll(); @Nonnull @Override Optional<S> findOne(@Nonnull final Example<S> example); @SuppressWarnings("unchecked") @Nonnull @Override List<S> findAll(@Nonnull final Example<S> example); @SuppressWarnings("unchecked") @Nonnull @Override List<S> findAll(@Nonnull final Example<S> example, @Nonnull final Sort sort); @SuppressWarnings("unchecked") @Nonnull @Override Page<S> findAll(@Nonnull final Example<S> example, @Nonnull final Pageable pageable); @SuppressWarnings("unchecked") @Override long count(@Nonnull Example<S> example); @SuppressWarnings("unchecked") @Override boolean exists(@Nonnull Example<S> example); @Nonnull @Override Optional<T> findOne(@Nonnull final Return<? extends Result<T>> whereClause); @Nonnull @Override List<T> findAll(@Nonnull final Return<? extends Result<T>> whereClause); @SuppressWarnings("unchecked") @Nonnull @Override Page<T> findAll(@Nonnull final QueryElement<? extends Result<T>> whereClause,
                           @Nonnull final Pageable pageable); @SuppressWarnings("unchecked") @Nonnull @Override List<T> findAll(@Nonnull final Iterable<Condition<T, ?>> conditions,
                           @Nonnull final Sort sort); @SuppressWarnings("unchecked") @Nonnull @Override List<T> findAll(@Nonnull final Iterable<Condition<T, ?>> conditions); @SuppressWarnings("unchecked") @Override int count(@Nonnull final QueryElement<? extends Result<T>> whereClause); @Override boolean exists(@Nonnull final QueryElement<? extends Result<T>> whereClause);  }