@@ -9,7 +9,7 @@ import { isExpiredOne, isExpiredMany, isExpiredAll } from 'ember-data-offline/ut
99import { updateMeta } from 'ember-data-offline/utils/meta' ;
1010
1111/**
12- Ofline mixin redefines all adapter methods for finding, creation, deletion to make request to offline storage.
12+ Offline mixin redefines all adapter persistance methods to make request to offline storage.
1313
1414@class Offline
1515@extends Ember.Mixin
@@ -31,8 +31,8 @@ export default Ember.Mixin.create(baseMixin, {
3131 } ,
3232
3333 /**
34- Returns the metadata for a given. Returned metadata consists information about
35- last fetched and last updated time .
34+ Returns the metadata for a given model . Returned metadata contains information about
35+ latest fetch and update times .
3636
3737 @method metadataForType
3838 @param typeClass {DS.Model}
@@ -45,9 +45,10 @@ export default Ember.Mixin.create(baseMixin, {
4545 } ,
4646
4747 /**
48- Overrides the method of an extended adapter (offline). Fetches a JSON array for all of the records for a given type
49- from offline adapter. If fetched records are expired then tries to create online job of fetching the records
50- from online adapter and persisting them offline. Returns a promise for the resulting payload.
48+ Overrides the method of an extended adapter (offline). Fetches a JSON array
49+ for all of the records for a given type from offline adapter. If fetched
50+ records are expired, it tries to create an online job to fetch the records
51+ from the online adapter and save them locally.
5152
5253 @method findAll
5354 @param store {DS.Store}
@@ -73,9 +74,9 @@ export default Ember.Mixin.create(baseMixin, {
7374 } ,
7475
7576 /**
76- Overrides the method of an extended adapter (offline). Fetches a JSON for a given type and ID
77- from offline adapter. If fetched record is expired then tries to create online job of fetching the record
78- from online adapter and persisting it offline. Returns a promise for the resulting payload .
77+ Overrides the method of an extended adapter (offline). Fetches a JSON array for all of the records for a given type
78+ from offline adapter. If fetched expired records and then tries to create an online job to fetch the records
79+ from the online adapter and save them locally .
7980 @method find
8081 @param store {DS.Store}
8182 @param typeClass {DS.Model}
@@ -102,9 +103,9 @@ export default Ember.Mixin.create(baseMixin, {
102103 } ,
103104
104105 /**
105- Overrides the method of an extended adapter (offline). Fetches a JSON array for the records that match a particular query
106- from offline adapter. If fetched records are expired then tries to create online job of fetching the records
107- from online adapter and persisting them offline. Returns a promise for the resulting payload .
106+ Overrides the method of an extended adapter (offline). Fetches a JSON array for all of the records for a given type
107+ from offline adapter. If fetched expired records and then tries to create an online job to fetch the records
108+ from the online adapter and save them locally .
108109
109110 @method query
110111 @param store {DS.Store}
@@ -132,9 +133,9 @@ export default Ember.Mixin.create(baseMixin, {
132133 } ,
133134
134135 /**
135- Overrides the method of an extended adapter (offline). Fetches a JSON array for a given type and IDs
136- from offline adapter. If fetched records are expired then tries to create online job of fetching the records
137- from online adapter and persisting them offline. Returns a promise for the resulting payload .
136+ Overrides the method of an extended adapter (offline). Fetches a JSON array for all of the records for a given type
137+ from offline adapter. If fetched expired records and then tries to create an online job to fetch the records
138+ from the online adapter and save them locally .
138139
139140 @method findMany
140141 @param store {DS.Store}
@@ -165,9 +166,8 @@ export default Ember.Mixin.create(baseMixin, {
165166 } ,
166167
167168 /**
168- Called when a newly created record is saved via the `save` method on a model record instance.
169- If this method was called from Queue(fromJob) then it would create an online job for creation record.
170- Calls the implementation method of parrent offline adapter.
169+ Overrides the method of an extended adapter (offline).
170+ If tries to create an online job to create the record and save it locally.
171171 @method createRecord
172172 @param store {DS.Store}
173173 @param type {DS.Model}
@@ -190,11 +190,8 @@ export default Ember.Mixin.create(baseMixin, {
190190 return this . _super . apply ( this , [ store , type , snapshot ] ) ;
191191 } ,
192192 /**
193- Called when an existing record is saved
194- via the `save` method on a model record instance.
195-
196- If this method was called from Queue(fromJob) then it would create an online job for updating record.
197- Calls the implementation method of parrent offline adapter.
193+ Overrides the method of an extended adapter (offline).
194+ If tries to create an online job to update the record and save it locally.
198195 @method updateRecord
199196 @param store {DS.Store}
200197 @param type {DS.Model}
@@ -211,9 +208,8 @@ export default Ember.Mixin.create(baseMixin, {
211208 return this . _super . apply ( this , [ store , type , snapshot ] ) ;
212209 } ,
213210 /**
214- Called when a record is deleted.
215- If this method was called from Queue(fromJob) then it would create an online job for deletion record.
216- Calls the implementation method of parrent offline adapter.
211+ Overrides the method of an extended adapter (offline).
212+ If tries to create an online job to delete the record and remove it locally.
217213 @method deleteRecord
218214 @param store {DS.Store}
219215 @param type {DS.Model}
0 commit comments