mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-13 18:16:28 +00:00
fix[storage]: Fix record class generation protocol field sort bug.
This commit is contained in:
1 parent
41bfac323e
commit
37503b082d
5 files changed
+27
-41
No files matched your search
@@ -159,7 +159,7 @@ public class StorageObject<K, V> implements IStorage<K, V> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <K> List<V> getIndexes(Func1<V, ?> func, K key) {
|
||||
public <INDEX> List<V> getIndexes(Func1<V, ?> func, INDEX key) {
|
||||
String indexName = LambdaUtils.getFieldName(func);
|
||||
var indexValues = indexMap.get(indexName);
|
||||
AssertionUtils.notNull(indexValues, "The index of [indexName:{}] does not exist in the static resource [resource:{}]", indexName, clazz.getSimpleName());
|
||||
@@ -172,7 +172,7 @@ public class StorageObject<K, V> implements IStorage<K, V> {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public <K, V> V getUniqueIndex(Func1<V, ?> func, K key) {
|
||||
public <INDEX, V> V getUniqueIndex(Func1<V, ?> func, INDEX key) {
|
||||
String uniqueIndexName = LambdaUtils.getFieldName(func);
|
||||
var indexValueMap = uniqueIndexMap.get(uniqueIndexName);
|
||||
AssertionUtils.notNull(indexValueMap, "There is no a unique index for [uniqueIndexName:{}] in the static resource [resource:{}]", uniqueIndexName, clazz.getSimpleName());
|
||||
|
||||
@@ -50,11 +50,10 @@ public interface IStorage<K, V> {
|
||||
|
||||
IdDef getIdDef();
|
||||
|
||||
@Nullable
|
||||
<K> List<V> getIndexes(Func1<V, ?> function, K key);
|
||||
<INDEX> List<V> getIndexes(Func1<V, ?> function, INDEX key);
|
||||
|
||||
@Nullable
|
||||
<K, V> V getUniqueIndex(Func1<V, ?> function, K key);
|
||||
<INDEX, V> V getUniqueIndex(Func1<V, ?> function, INDEX key);
|
||||
|
||||
int size();
|
||||
}
|
||||
Reference in new issue
Block a user