Package com.hexagonkt.store.hashmap
Class HashMapStore
-
- All Implemented Interfaces:
-
com.hexagonkt.store.Store
public final class HashMapStore<T extends Object, K extends Object> implements Store<T, K>
-
-
Constructor Summary
Constructors Constructor Description HashMapStore(KClass<T> type, KProperty1<T, K> key, String name, HashMap<K, Map<String, Object>> store)
-
Method Summary
Modifier and Type Method Description KClass<T>getType()KProperty1<T, K>getKey()StringgetName()KinsertOne(T instance)List<K>insertMany(List<T> instances)KsaveOne(T instance)List<K>saveMany(List<T> instances)BooleanreplaceOne(T instance)List<T>replaceMany(List<T> instances)BooleanupdateOne(K key, Map<String, ?> updates)LongupdateMany(Map<String, ?> filter, Map<String, ?> updates)BooleandeleteOne(K id)LongdeleteMany(Map<String, ?> filter)TfindOne(K key)Map<String, ?>findOne(K key, List<String> fields)List<T>findMany(Map<String, ?> filter, Integer limit, Integer skip, Map<String, Boolean> sort)List<Map<String, ?>>findMany(Map<String, ?> filter, List<String> fields, Integer limit, Integer skip, Map<String, Boolean> sort)Longcount(Map<String, ?> filter)Unitdrop()-
-
Method Detail
-
getName
String getName()
-
insertMany
List<K> insertMany(List<T> instances)
-
replaceOne
Boolean replaceOne(T instance)
-
replaceMany
List<T> replaceMany(List<T> instances)
-
updateMany
Long updateMany(Map<String, ?> filter, Map<String, ?> updates)
-
deleteMany
Long deleteMany(Map<String, ?> filter)
-
findMany
List<T> findMany(Map<String, ?> filter, Integer limit, Integer skip, Map<String, Boolean> sort)
-
findMany
List<Map<String, ?>> findMany(Map<String, ?> filter, List<String> fields, Integer limit, Integer skip, Map<String, Boolean> sort)
-
count
Long count(Map<String, ?> filter)
-
drop
Unit drop()
-
-
-
-