MEntity class abstract

Represents an entity defined by a json-schema that's backed by json value using the wrapped field. A MModel is a non-persisted entity, where as MEntity represents a persisted entity that has an ID

Inheritance
Implemented types
Implementers
Available extensions

Constructors

MEntity(Map<String, dynamic> wrapped, {MSchemaRef? mtype, bool? update})

Properties

diffHashCode int
no setterinherited
diffKey → dynamic
For Diffable
no setterinherited
diffSource → dynamic
For Diffable
no setteroverride
diffSourceByDateModified → dynamic

Available on MEntity, provided by the MEntityEquality extension

no setter
hashCode int
The hash code for this object.
no setteroverride
id String?
no setteroverride
ignoredPaths Set<JsonPath>
no setterinherited
mfields Set<String>
no setterinherited
mkey MKey?
no setteroverride
mkeyOrNull MKey?
no setteroverride
mkeyOrNull MKey?

Available on HasMverseMeta, provided by the HasMMetaExt extension

no setter
mmeta MMeta
getter/setter pairoverride-getter
mmodified DateTime?

Available on HasMverseMeta, provided by the HasMMetaExt extension

no setter
mtype MSchemaRef
no setterinherited
mtype MSchemaRef?

Available on HasMverseMeta, provided by the HasMMetaExt extension

no setter
qualifiedKey String?

Available on HasMverseMeta, provided by the HasMMetaExt extension

A fully qualified key that includes the type
no setter
recordKey RecordKey?
no setteroverride
recordKey RecordKey?

Available on HasMverseMeta, provided by the HasMMetaExt extension

Contains just the domainId and the mxid (no type)
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wrapped Map<String, dynamic>
finalinherited
wrappedOrEmpty Map<String, dynamic>

Available on MModel?, provided by the MModelExt extension

no setter
wrappedValues Map<String, dynamic>

Available on MModel?, provided by the MModelExt extension

Returns the json payload, but omits any metadata values
no setter

Methods

call<T>(dynamic key) → T?
inherited
clone() → dynamic
inherited
diffEquals(dynamic other) bool
inherited
diffIdentical(dynamic other) bool
inherited
equalsByDateModified(dynamic other) bool

Available on MEntity, provided by the MEntityEquality extension

get(String name) → dynamic
inherited
getByPath<T>(JsonPath path) → T
inherited
has(String fieldName) bool
inherited
hashCodeByDateModified() int

Available on MEntity, provided by the MEntityEquality extension

jpath<T>(JsonPath<T> path, [T? value]) → T?
inherited
modified() → dynamic
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prune(Set<String> fields) → void
inherited
setByPath<T>(JsonPath<T> path, T? value) → dynamic
inherited
sync([Set<String>? fields]) → void
There are some weird cases where collections aren't synced properly with the underlying json. This will overwrite the json with the latest value of the variable.
inherited
takeFrom(dynamic source) → void
inherited
takeFromMap(Map<String, dynamic>? from, {bool copyEntries = true}) → void
Used for meta-forms in setting deep properties
inherited
toMap() Map<String, dynamic>
For RouteParams - move at some point?
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override
operator [](dynamic key) → dynamic
inherited
operator []=(String key, dynamic value) → void
inherited

Static Methods

fromJson(dynamic json) MEntity?
override