JsonEntityCacheSimple class

Simple implementation of JsonEntityCache.

Implemented types
Implementers
Available Extensions

Constructors

JsonEntityCacheSimple()

Properties

allowEntityFetch bool
If true it will allow the use of on repository to fetch an entity by an ID reference.
no setteroverride
cachedEntities List<Object>
Returns all cached entities of this cache.
no setter
cachedEntitiesLength int
Returns the total cached entities of this cache.
no setter
hashCode int
The hash code for this object.
no setterinherited
id int
The cache ID.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalCachedEntites int
Returns the total number of cached entities.
no setter

Methods

cacheEntities<O>(List<O> entities, [dynamic idGetter(O o)?]) → void
Caches the List entities. This is called by the entity decoder/loader. See cacheEntity.
override
cacheEntity<O>(O entity, [dynamic idGetter(O o)?]) → void
Caches entity. This is called by the entity decoder/loader. See cacheEntities.
override
clearCachedEntities() → void
Clears all cached entities of this cache.
override
getCachedEntities<O>({Type? type}) Map<dynamic, Object>?
Returns the cached entities of type.
getCachedEntitiesByIDs<O>(List ids, {Type? type, bool removeCachedIDs = false}) Map<dynamic, Object>?
Returns the cached entities of type with ids.
override
getCachedEntityByID<O>(dynamic id, {Type? type}) → O?
Returns a cached entity of type with id.
override
getCachedEntityByMapID<O>(Map<Object?, Object?> map, {Type? type}) → O?
Returns a cached entity of type with an id from map entries. See getEntityIDFromMap.
override
getEntityID<O>(O object, {Type? type, dynamic idGetter(O o)?}) Object?
Returns the ID value from object for type.
override
getEntityIDFromMap(Map<Object?, Object?> map, {Type? type}) Object?
Returns the ID value into map for type.
override
isCachedEntity<O>(O entity, {Type? type, bool identicalEquality = true}) bool
Returns true if entity is cached.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeCachedEntity<O>(dynamic id, {Type? type}) → O?
Removes an entity of type with id of this cache.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited