Persistence class
A persistence layer that knows how to persistently store deployment and app task information across app restart.
Constructors
- Persistence()
-
factory
Properties
- database ↔ Database?
-
getter/setter pair
- databaseName → String
-
Full path and name of the database.
no setter
- databasePath → String
-
Path of the database.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> - Close the persistence layer. After close is called, no deployment can be accessed or saved.
-
eraseDeployment(
String deploymentId) → Future< void> -
Erase the SmartphoneDeployment with the
deploymentId
from local cache. -
getAllStudyDeployments(
) → Future< List< SmartphoneStudy> > - Get the list of all study deployments previously stored on this phone.
-
getUserTasks(
) → Future< List< UserTaskSnapshot> > - Get the entire list of UserTaskSnapshot.
-
init(
[SmartphoneDeployment? deployment]) → Future< void> - Initialize the persistence layer and the database.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restoreDeployment(
String deploymentId) → Future< SmartphoneDeployment?> -
Restore the SmartphoneDeployment with the
deploymentId
from local cache. Returns a SmartphoneDeployment if successful, null otherwise. -
saveDeployment(
SmartphoneDeployment deployment) → Future< bool> -
Save the
deployment
persistently to a local cache. Returnstrue
if successful. -
saveUserTask(
UserTask task) → Future< void> - Update or delete a task queue entry.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- DATABASE_NAME → const String
- DEPLOYED_AT_COLUMN → const String
- DEPLOYMENT_COLUMN → const String
- DEPLOYMENT_STATUS_COLUMN → const String
- DEPLOYMENT_TABLE_NAME → const String
- DEVICE_ROLE_NAME_COLUMN → const String
- ID_COLUMN → const String
- PARTICIPANT_ID_COLUMN → const String
- PARTICIPANT_ROLE_NAME_COLUMN → const String
- STUDY_DEPLOYMENT_ID_COLUMN → const String
- STUDY_ID_COLUMN → const String
- TASK_COLUMN → const String
- TASK_ID_COLUMN → const String
- TASK_QUEUE_TABLE_NAME → const String
- UPDATED_AT_COLUMN → const String