DaoTransientOperation class
Where we store products for transient operations.
Use DaoProduct instead if you want to enrich the local product database.
This class is only for transient operations. For instance, when you submit a change, we store the changes here, while async'ly saving them on the server. This way we can take into account those changes in the app before they are actually saved on the server. And typically, when we got an ACK from the server, we can remove that change from the pending changes.
It is open to different uses, therefore the key is just a stupid String.
Of course, to make those different uses compatible, the key should be
properly designed, e.g. with all keys starting with 'USECASEx;'
This is not a Lazy database, because:
- it's supposed to be little anyway, so we can load it at startup
- the way we use it may sometimes require instant access (no
await)
- Inheritance
-
- Object
- AbstractDao
- DaoTransientOperation
Constructors
- DaoTransientOperation(LocalDatabase localDatabase)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- localDatabase → LocalDatabase
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete(
String key) → Future< void> -
get(
String key) → Product? -
getAll(
String barcode) → Iterable< TransientOperation> -
getAllKeys(
) → List< String> -
init(
) → Future< void> -
Best place to open a hive box.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
String key, Product product) → Future< void> -
registerAdapter(
) → void -
Where the specific
registerAdapterhive related method is called.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited