DatabaseStorable class abstract

interface for objects that can be stored in a database This class should also contain a from json constructor that allows to construct via an empty json

Constructors

DatabaseStorable()

Properties

collection String
The name of the collection to use. Usually this will be the name of the runtime type. You may prefer to override this as dart the name of the runtime type may be a cryptic one if compiled for the web. E.g. minified:cI instead of User.
no setter
hashCode int
The hash code for this object.
no setterinherited
id String?
The id for the Object. May be null if the object was not yet stored. The DatabaseAdapter should return an object containing an id.
no setter
isManaged bool
It is assumed that objects with ids are managed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() JSON
Serialize object to JSON
toString() String
A string representation of this object.
inherited

Operators

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