AtCollectionModel<T> class
abstract
- Implemented types
- Implementers
- Annotations
-
- @Deprecated("Use AtClient.collection for collection-style operations")
Constructors
Properties
- collectionName ↔ String
-
collectionName is used to identify collections of same type
For example, if Preference is a class that extends AtCollectionModel then collectionName can be "preferences"
Defaulted to the name of the dart class in lowercase
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String
-
id uniquely identifies this model.
getter/setter pair
- namespace ↔ String
-
namespace is used to persist the collection model
Typically namespace is used to identify the app that is used to persist the data.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
getter/setter pair
- streams ↔ AtCollectionModelStreamOperationsImpl
-
getter/setter pair
Methods
-
delete(
) → Future< bool> -
Deletes the object and un-shares with every @sign it was shared with previously
override
-
fromJson(
Map< String, dynamic> jsonObject) → dynamic -
Populated state of AtCollectionModel from its JSON representation.
class that extends AtCollectionModel has to override this method to populate object's state.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
{ObjectLifeCycleOptions? options}) → Future< bool> -
Saves the json representation of AtCollectionModel to the secondary server of a atSign.
save calls toJson method to get the json representation of a AtCollectionModel.
override
-
share shares the AtCollectionModel object with the atSigns in
atSignslist.override -
Returns a list of @sign with whom AtCollectionModel object is shared with
override
-
toJson(
) → Map< String, dynamic> -
toJson method returns JSON representation of the object.
The save method invokes this method to get the state which will be persisted to the secondary server.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unshare un-shares the AtCollectionModel object with the atSigns in
atSignslist.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getModel<
T extends AtCollectionModel> ({required String id, required String namespace, required String collectionName}) → Future< T> -
Returns an instance of a class extending AtCollectionModel for the given
id,namespaceandcollectionNameAn instance of AtJsonCollectionModel is returned If a specific factory class for a given collection name is not registered Factory class for acollectionNamecan be registered using method AtCollectionModel.registerFactories(factories) -
getModelsByCollectionName<
T extends AtCollectionModel> (String collectionName) → Future< List< T> > -
Returns list of AtCollectionModels that are created for the
collectionNamepassed Returns an empty list when there are no matches -
Returns list of AtCollectionModels that are shared by the given
atSignatSignis an optional argument and if not passed returns all of the AtCollectionModels shared by any atSign Returns an empty list when nothing has been shared - Returns list of AtCollectionModels that are shared any atSign Returns an empty list when nothing has been shared
-
Returns list of AtCollectionModels that are shared with the given
atSignReturns an empty list when nothing has been shared - Returns list of AtCollectionModels that are shared with any atSign Returns an empty list when nothing has been shared
-
registerFactories(
List< AtCollectionModelFactory< factories) → voidAtCollectionModel> > - Registers list of AtCollectionModelFactory instances. These factories will be used while creating specific sub classes of AtCollectionModel for a given collection