Example usage for org.springframework.data.jpa.repository JpaRepository findAll

List of usage examples for org.springframework.data.jpa.repository JpaRepository findAll

Introduction

In this page you can find the example usage for org.springframework.data.jpa.repository JpaRepository findAll.

Prototype

@Override
    List<T> findAll();

Source Link

Usage

From source file:org.lightadmin.core.view.preparer.ListViewPreparer.java

@SuppressWarnings("unchecked")
private Pair<? extends ScopeMetadata, Long> scopeWithRecordsCount(final PredicateScopeMetadata scope,
        final JpaRepository<?, ?> repository) {
    long recordsCount = Collections2.filter(repository.findAll(), scope.predicate()).size();

    return Pair.create(scope, recordsCount);
}