public interface OrmObjectObserver
If you want to listen for data changes in an ORM database, call the registration interface provided in
OrmContext to register an observer, and then specify the callback for receiving the change content as needed.
OrmContextSystemCapability.Data#DATA_APPDATAMGR| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onChange(OrmContext changeContext,
AllChangeToTarget subAllChange) |
Callback invoked when data changes.
|
void onChange(OrmContext changeContext, AllChangeToTarget subAllChange)
This callback is used to receive the database context and the change content.
changeContext - Indicates the database context after the change.subAllChange - Indicates the change content, including the list of objects
that are inserted, updated, or deleted.OrmContext,
AllChangeToTarget