ModelRefLoaderMixin<T> mixin
It is available by mixing in when using ModelRefBase in DocumentBase.value.
When data is loaded in DocumentBase.load, the data in ModelRefBase is automatically loaded and stored.
Define builder to store relevant documents and data.
Mix in the document from which you are relaying.
DocumentBase.valueでModelRefBaseを利用している際にミックスインすることで利用できます。
DocumentBase.loadでデータをロードする際に合わせてModelRefBase内のデータを自動でロードして格納します。
builderを定義して関連するドキュメントとデータの格納を行ってください。
リレーション元のドキュメントにミックスインしてください。
- Implemented types
-
- DocumentBase<
T>
- DocumentBase<
Properties
-
builder
→ List<
ModelRefBuilderBase< T> > -
ModelRefBuilder], which implements the definition of the loading method.
no setter
- databaseQuery → ModelAdapterDocumentQuery
-
Database queries for documents.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- loaded → bool
-
Returns
true
if the data was successfully loaded by the load method.no setterinherited -
loading
→ Future<
T?> ? -
If load or reload is executed, it waits until the loading process is completed.
no setterinherited
- modelQuery → DocumentModelQuery
-
Query for loading and saving documents.
finalinherited
-
reloading
→ Future<
T?> ? -
If reload is done, it waits until the loading process is finished.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
saving
→ Future<
void> ? -
If save or delete is executed, it waits until the read process is completed.
no setterinherited
-
subscriptions
→ List<
StreamSubscription> -
List of currently subscribed notifications. All should be canceled when the object is destroyed.
no setterinherited
- uid → String
-
Returns the ID for the document path.
no setterinherited
- value → T?
-
The current value stored in this document.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
batch(
{int splitLength = 100}) → ModelBatchDocumentBuilder< T> -
Builder for batch processing.
inherited
-
delete(
) → Future< void> -
Data can be deleted.
inherited
-
deleteRequest(
) → Future< void> -
Implement internal processing when delete is executed.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
override
-
filterOnDidLoad(
T? value) → Future< T?> -
Callback called after loading.
override
-
filterOnLoad(
DynamicMap rawData) → DynamicMap -
Implement filters when loading data.
inherited
-
filterOnSave(
DynamicMap rawData) → DynamicMap -
You can filter the data to be saved.
inherited
-
fromMap(
DynamicMap map) → T -
Defines the object transformation from DynamicMap to
T
, which is output by decoding Json.inherited -
handledOnUpdate(
ModelUpdateNotification update) → Future< void> -
Describe the callback process to be passed to ModelAdapterDocumentQuery.callback.
inherited
-
load(
) → Future< T?> -
Reads documents corresponding to modelQuery.
inherited
-
loadRequest(
) → Future< DynamicMap?> -
Implement internal processing when load or reload is executed.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
reload(
) → Future< T?> -
Reload the document corresponding to modelQuery.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
save(
T? newValue) → Future< void> -
Data can be saved.
inherited
-
saveRequest(
DynamicMap map) → Future< void> -
Implement internal processing when save is executed.
inherited
-
toMap(
T value) → DynamicMap -
Defines the conversion from a
T
object to a DynamicMap that can later be Json encoded.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
transaction(
) → ModelTransactionDocumentBuilder< T> -
Builder for transactions.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited