ModelInfo class
In order to represent the model stored in objectbox-model.json
in Dart,
several classes have been introduced. Conceptually, these classes are
comparable to how models are handled in ObjectBox Java and ObjectBox Go.
This is also why for explanations on most concepts related to ObjectBox
models, you can refer to https://docs.objectbox.io/advanced.
Constructors
-
ModelInfo({required List<
ModelEntity> entities, required IdUid lastEntityId, required IdUid lastIndexId, required IdUid lastRelationId, required IdUid lastSequenceId, required List<int> retiredEntityUids, required List<int> retiredIndexUids, required List<int> retiredPropertyUids, required List<int> retiredRelationUids, required int modelVersion, required int modelVersionParserMinimum, required int version}) - ModelInfo.empty()
-
ModelInfo.fromMap(Map<
String, dynamic> data, {bool check = true})
Properties
-
entities
↔ List<
ModelEntity> -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastEntityId ↔ IdUid
-
getter/setter pair
- lastIndexId ↔ IdUid
-
getter/setter pair
- lastRelationId ↔ IdUid
-
getter/setter pair
- lastSequenceId ↔ IdUid
-
getter/setter pair
- modelVersion ↔ int
-
getter/setter pair
- modelVersionParserMinimum ↔ int
-
getter/setter pair
-
retiredEntityUids
↔ List<
int> -
getter/setter pair
-
retiredIndexUids
↔ List<
int> -
getter/setter pair
-
retiredPropertyUids
↔ List<
int> -
getter/setter pair
-
retiredRelationUids
↔ List<
int> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version ↔ int
-
getter/setter pair
Methods
-
containsUid(
int uid) → bool -
createEntity(
String name, [int uid = 0]) → ModelEntity -
createIndexId(
) → IdUid -
findEntityByName(
String name) → ModelEntity? -
findEntityByUid(
int uid) → ModelEntity? -
findSameEntity(
ModelEntity other) → ModelEntity? -
generateUid(
) → int -
getEntityByUid(
int uid) → ModelEntity -
hasRelations(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeEntity(
ModelEntity entity) → void -
toMap(
) → Map< String, dynamic> - Convert to a string map to be used in the model JSON file.
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited