@@ -96,11 +96,9 @@ import org.springframework.data.mongodb.repository.<% if (reactive) { %>Reactive
96
96
import org.springframework.data.neo4j.repository.<% if (reactive) { %>Reactive <% } %>Neo4jRepository;
97
97
< % _ } _%>
98
98
<% _ if (databaseTypeCouchbase) { _% >
99
- import org.springframework.data.domain.Sort;
100
99
import com.couchbase.client.java.query.QueryScanConsistency;
101
100
import org.springframework.data.couchbase.repository.Query;
102
101
import org.springframework.data.couchbase.repository.ScanConsistency;
103
- import org.springframework.data.couchbase.repository.<% if (reactive) { %>Reactive <% } %>CouchbaseRepository;
104
102
import org.springframework.data.domain.PageImpl;
105
103
< % _ } _%>
106
104
<% _ if (reactive && databaseTypeCassandra) { _% >
@@ -172,7 +170,7 @@ import static <%= packageName %>.config.Constants.ID_DELIMITER;
172
170
_%>
173
171
<% _ if ((databaseTypeSql && ! reactive) || databaseTypeMongodb || databaseTypeNeo4j || databaseTypeCouchbase) { _% >
174
172
@Repository
175
- public interface UserRepository extends < % if (databaseTypeSql) { % > JpaRepository<< %= asEntity (' User' ) % > , < %= user .primaryKey .type % >> < % } % >< % if (reactive) { % > Reactive< % } % >< % if (databaseTypeMongodb) { % > MongoRepository<< %= asEntity (' User' ) % > , String >< % } % >< % if (databaseTypeNeo4j) { % > Neo4jRepository<< %= asEntity (' User' ) % > , String >< % } % >< % if (databaseTypeCouchbase) { % > CouchbaseRepository << %= asEntity (' User' ) % > , String >< % if (searchEngineCouchbase) { % > , SearchCouchbaseRepository<< %= asEntity (' User' ) % > , String >< % } } % > {
173
+ public interface UserRepository extends < % if (databaseTypeSql) { % > JpaRepository<< %= asEntity (' User' ) % > , < %= user .primaryKey .type % >> < % } % >< % if (reactive) { % > Reactive< % } % >< % if (databaseTypeMongodb) { % > MongoRepository<< %= asEntity (' User' ) % > , String >< % } % >< % if (databaseTypeNeo4j) { % > Neo4jRepository<< %= asEntity (' User' ) % > , String >< % } % >< % if (databaseTypeCouchbase) { % > N1qlCouchbaseRepository << %= asEntity (' User' ) % > , String >< % if (searchEngineCouchbase) { % > , SearchCouchbaseRepository<< %= asEntity (' User' ) % > , String >< % } } % > {
176
174
< % _ if (cacheManagerIsAvailable) { _% >
177
175
178
176
String USERS_BY_LOGIN_CACHE = " usersByLogin" ;
@@ -241,18 +239,6 @@ public interface UserRepository extends <% if (databaseTypeSql) { %>JpaRepositor
241
239
< % if (! reactive) { % > // See https://github.com/neo4j/sdn-rx/issues/51<% } %>
242
240
< %= listOrFlux % > << %= asEntity (' User' ) % >> findAll ();
243
241
244
- < % _ } _% >
245
- < % _ if (databaseTypeCouchbase) { _% >
246
- @Override
247
- @ScanConsistency (query = QueryScanConsistency .REQUEST_PLUS )
248
- < %= listOrFlux % > << %= asEntity (' User' ) % >> findAll ();
249
-
250
- < % _ } _% >
251
- < % _ if (databaseTypeCouchbase) { _% >
252
- @Override
253
- @ScanConsistency (query = QueryScanConsistency .REQUEST_PLUS )
254
- < %= listOrFlux % > << %= asEntity (' User' ) % >> findAll (Sort sort);
255
-
256
242
< % _ } _% >
257
243
< % _ if (databaseTypeSql) { _% >
258
244
@EntityGraph (attributePaths = " authorities" )
@@ -287,7 +273,7 @@ public interface UserRepository extends <% if (databaseTypeSql) { %>JpaRepositor
287
273
< % } else { % >
288
274
< % _ if (databaseTypeCouchbase) { _% >
289
275
default Page<< %= asEntity (' User' ) % >> findAllActivatedIsTrue (Pageable pageable ) {
290
- return new PageImpl <> (findAllActivatedIsTrue (new org.springframework.data.couchbase.core.query.Query (). with ( pageable). export ( )), pageable, countAllActivatedIsTrue ());
276
+ return new PageImpl <> (findAllActivatedIsTrue (N1qlCouchbaseRepository . pageableStatement ( pageable)), pageable, countAllActivatedIsTrue ());
291
277
}
292
278
< % _ } else { _% >
293
279
Page<< %= asEntity (' User' ) % >> findAllByIdNotNullAndActivatedIsTrue (Pageable pageable);
0 commit comments