@@ -376,11 +376,26 @@ public class RedisKeyValueAdapter extends AbstractKeyValueAdapter
|
||||
return getAllOf(keyspace, Object.class, -1, -1);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.keyvalue.core.KeyValueAdapter#getAllOf(java.lang.String, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> getAllOf(String keyspace, Class<T> type) {
|
||||
return getAllOf(keyspace, type, -1, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all elements for given keyspace.
|
||||
*
|
||||
* @param keyspace the keyspace to fetch entities from.
|
||||
* @param type the desired target type.
|
||||
* @param offset index value to start reading.
|
||||
* @param rows maximum number or entities to return.
|
||||
* @param <T>
|
||||
* @return never {@literal null}.
|
||||
* @since 2.5
|
||||
*/
|
||||
public <T> List<T> getAllOf(String keyspace, Class<T> type, long offset, int rows) {
|
||||
|
||||
byte[] binKeyspace = toBytes(keyspace);
|
||||
|
||||
@@ -227,8 +227,8 @@ public class RedisKeyValueAdapterTests {
|
||||
assertThat(((Person) loaded).address.country).isEqualTo("Andor");
|
||||
}
|
||||
|
||||
@Test // #1995
|
||||
void getAllOfShouldReturnSuperTypeIfForUnregisteredTypeAlias() {
|
||||
@Test // GH-1995
|
||||
void getAllOfShouldReturnSuperTypeForUnregisteredTypeAlias() {
|
||||
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
map.put("_class", "taveren");
|
||||
@@ -240,8 +240,8 @@ public class RedisKeyValueAdapterTests {
|
||||
assertThat(loaded).isExactlyInstanceOf(Person.class);
|
||||
}
|
||||
|
||||
@Test // #1995
|
||||
void getAllOfShouldReturnCorrectTypeIfForRegisteredTypeAlias() {
|
||||
@Test // GH-1995
|
||||
void getAllOfShouldReturnCorrectTypeForRegisteredTypeAlias() {
|
||||
|
||||
mappingContext.getPersistentEntity(TaVeren.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user