16
16
package org .springframework .data .keyvalue .core ;
17
17
18
18
import java .io .Serializable ;
19
- import java .util .List ;
20
19
21
20
import org .springframework .beans .factory .DisposableBean ;
22
21
import org .springframework .data .domain .Sort ;
@@ -52,9 +51,9 @@ public interface KeyValueOperations extends DisposableBean {
52
51
* assigned to requested type.
53
52
*
54
53
* @param type must not be {@literal null}.
55
- * @return empty collection if no elements found.
54
+ * @return empty iterable if no elements found.
56
55
*/
57
- <T > List <T > findAll (Class <T > type );
56
+ <T > Iterable <T > findAll (Class <T > type );
58
57
59
58
/**
60
59
* Get all elements ordered by sort. Respects {@link KeySpace} if present and therefore returns all elements that can
@@ -64,7 +63,7 @@ public interface KeyValueOperations extends DisposableBean {
64
63
* @param type must not be {@literal null}.
65
64
* @return
66
65
*/
67
- <T > List <T > findAll (Sort sort , Class <T > type );
66
+ <T > Iterable <T > findAll (Sort sort , Class <T > type );
68
67
69
68
/**
70
69
* Get element of given type with given id. Respects {@link KeySpace} if present and therefore returns all elements
@@ -90,9 +89,9 @@ public interface KeyValueOperations extends DisposableBean {
90
89
*
91
90
* @param query must not be {@literal null}.
92
91
* @param type must not be {@literal null}.
93
- * @return empty collection if no match found.
92
+ * @return empty iterable if no match found.
94
93
*/
95
- <T > List <T > find (KeyValueQuery <?> query , Class <T > type );
94
+ <T > Iterable <T > find (KeyValueQuery <?> query , Class <T > type );
96
95
97
96
/**
98
97
* Get all elements in given range. Respects {@link KeySpace} if present and therefore returns all elements that can
@@ -103,7 +102,7 @@ public interface KeyValueOperations extends DisposableBean {
103
102
* @param type must not be {@literal null}.
104
103
* @return
105
104
*/
106
- <T > List <T > findInRange (int offset , int rows , Class <T > type );
105
+ <T > Iterable <T > findInRange (int offset , int rows , Class <T > type );
107
106
108
107
/**
109
108
* Get all elements in given range ordered by sort. Respects {@link KeySpace} if present and therefore returns all
@@ -115,7 +114,7 @@ public interface KeyValueOperations extends DisposableBean {
115
114
* @param type
116
115
* @return
117
116
*/
118
- <T > List <T > findInRange (int offset , int rows , Sort sort , Class <T > type );
117
+ <T > Iterable <T > findInRange (int offset , int rows , Sort sort , Class <T > type );
119
118
120
119
/**
121
120
* @param objectToUpdate must not be {@literal null}.
0 commit comments