MobileObject Class |
Namespace: Oracle.Cloud.Mobile.Synchronization.MobileEndpoint
The MobileObject type exposes the following members.
Name | Description | |
---|---|---|
![]() | MobileObject |
Not for external callers, use MobileEndpoint.CreateObject() instead.
|
Name | Description | |
---|---|---|
![]() | HasConflict |
Returns true if offline updates resulted in a conflict on the service, false otherwise.
(Inherited from MobileResource.) |
![]() | HasOfflineCommitError |
Returns true if committing an offline update to the service resulted in an error from the service.
(Inherited from MobileResource.) |
![]() | HasOfflineUpdates |
Returns true if the resource has pending offline updates, false otherwise.
(Inherited from MobileResource.) |
![]() | IsPendingOfflineDelete |
Returns true if the resource was deleted while offline, false otherwise.
(Inherited from MobileResource.) |
![]() | IsPinned |
Returns true if this resource is pinned, false otherwise. Pinned resources are not evicted and can be synchronized in a batch
by calling Synchronizer.SynchronizePinnedResourcesAsync.
(Inherited from MobileResource.) |
![]() | JsonObject |
The underlying JSON representation of the object.
|
![]() | LastSyncTime |
The time that this resource was last synchronized, null if it was never synchronized ex if it was just created locally.
(Inherited from MobileResource.) |
![]() | Uri |
The Uri of the object. For locally created objects that are not yet committed to the service, a unique Uri is generated
in its endpoint that would be updated by the service.
(Inherited from MobileResource.) |
Name | Description | |
---|---|---|
![]() | AddLinkedResourceAsync |
Adds a depdendency to another resource. This depdency is used to monitor changes to the linked resources in case
of offline writes: ex. if Resource1 and Resource2 were both created while offline and Resource2 embeds a link to
Resource1, the URI for Resource1 would be a temporary one created offline by the system. On going online, when
the real URI for Resource1 gets assigned by the service, Resource2 would get
notified in OnLinkedResourceUriChanged() and can update the embedded link to the new URI.
(Inherited from MobileResource.) |
![]() | DeleteAsync |
Deletes the object. Caches the delete locally if offline.
|
![]() | DeleteAsync(Boolean) |
Deletes the object.
|
![]() | Dispose |
Dispose method of the disposable pattern.
(Inherited from MobileResource.) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetConflictingResourceAsync |
Returns the object that conflicts with this one. Only the cached copy is returned (if it exists), so callers should refresh
the object from the service first.
|
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetPropertyNames |
Populates the names of properties and their types that can be used for quering along with indexes on these properties.
|
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | NotifyPropertyChanged |
Raises the PropertyChanged event.
(Inherited from MobileResource.) |
![]() | OnCachedResourceChanged |
Invoked if the object inthe cache has changed. This instance will not be automatically loaded from the cached copy.
Callers can reload from the cache by calling ReloadAsync().
The event is only raised if StartListeningForChanges() is invoked. Derived classes can override this method.
(Inherited from MobileResource.) |
![]() | OnDataLoad |
Invoked when the JsonObject is populated so that derived classes can perform initialization or cleanup.
The method may be called several times in its lifetime including if ReloadAsync() is invoked.
|
![]() | OnLinkedResourceUriChanged |
This method along with AddLinkedResourceAsync can be used to monitor changes to linked resources created offlien: ex.
if Resource1 and Resource2 were both created while offline and Resource2 embeds a link to Resource1, the URI for
Resource1 would be a temporary one created offline by the system. On going online, when the real URI for Resource1 gets
assigned by the service, Resource2 would get notified in OnLinkedResourceUriChanged() and can update the embedded link
to the new URI.
For this method to be invoked, AddLinkedResourceAsync() must have been previous called and both the resources saved
offline.
(Inherited from MobileResource.) |
![]() | PinAsync |
Pins this resource.
(Inherited from MobileResource.) |
![]() | PopulateProperties |
Extracts property values from this object that can be queried on in the local cache.
Derived classs can control where the property values come from. The default implementation looks for the
values as top-level properties in the underlying JSON object.
|
![]() | ReloadAsync |
Reloads the data that was last downloaded from the service. If the device is offline
then it loads data from the cache. Any offline updates are not discarded.
(Inherited from MobileResource.) |
![]() | ReloadAsync(Boolean, Boolean) |
Reloads the data.
(Inherited from MobileResource.) |
![]() | SaveAsync |
Saves any changes to the object back to the service. Caches the changes locally if offline.
|
![]() | SaveAsync(Boolean) |
Saves any changes to the object back to the service. If saveIfOffline is true, it will cache the changes incase of offline.
|
![]() | StartListeningForChanges |
Starts listening for cache changes and raises the ResourceChanged event. Callers must call StopListeningForChanges() or Dispose()
when events are no longer required otherwise the object will leak.
(Inherited from MobileResource.) |
![]() | StopListeningForChanges |
Stops listening for cache changes and ResourceChanged will no longer be raised.
(Inherited from MobileResource.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | UnpinAsync |
Unpins this resource.
(Inherited from MobileResource.) |
Name | Description | |
---|---|---|
![]() | PropertyChanged |
Event that is raised if the object changes or if it is reloaded from the cache. Derived classes can raise the event by calling
NotifyPropretyChanged().
(Inherited from MobileResource.) |