Entity<T extends Object> class
abstract
Cache-controlling entity. Implement this interface for cache control
- Implemented types
- Implementers
Constructors
- Entity.create(T data, EntityValidator validator)
-
Creates an entity with
data
validated byvalidator
constfactory
Properties
- data → T
-
Entity data
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createSnapshot(
) → Entity< T> -
Crates a snapshot of validator preserving it's current EntityValidator.isValid value
override
-
invalidate(
) → Entity< T> - Creates an invalid entity out of this one
-
isValid(
) → bool -
If true cached entity is valid.
inherited
-
map<
R extends Object> (R mapper(T)) → Entity< R> -
Transforms Entity data to another entity data with
mapper
Validation remains the same -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
serialize(
) → String -
A way to serialize entity
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited