JsonEntityCache class abstract
A JSON entity encoding/decoding cache.
- Implementers
Constructors
Properties
- allowEntityFetch → bool
-
If
true
it will allow the use of on repository to fetch an entity by an ID reference.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
The cache ID.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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. -
cacheEntity<
O> (O entity, [dynamic idGetter(O o)?]) → void -
Caches
entity
. This is called by the entity decoder/loader. See cacheEntities. -
clearCachedEntities(
) → void - Clears all cached entities of this cache.
-
getCachedEntitiesByIDs<
O> (List ids, {Type? type, bool removeCachedIDs = false}) → Map< dynamic, Object> ? -
Returns the cached entities of
type
withids
. -
getCachedEntityByID<
O> (dynamic id, {Type? type}) → O? -
Returns a cached entity of
type
withid
. -
getCachedEntityByMapID<
O> (Map< Object?, Object?> map, {Type? type}) → O? -
Returns a cached entity of
type
with an id frommap
entries. See getEntityIDFromMap. -
getEntityID<
O> (O object, {Type? type, dynamic idGetter(O o)?}) → Object? -
Returns the ID value from
object
fortype
. -
getEntityIDFromMap(
Map< Object?, Object?> map, {Type? type}) → Object? -
Returns the ID value into
map
fortype
. -
isCachedEntity<
O> (O entity, {Type? type, bool identicalEquality = true}) → bool -
Returns
true
ifentity
is cached. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited