|
|
|
_addReferenceToMap(
refItem
: item
parentItem
: item
attribute
: string
) :
void
Method to add an reference map entry for an item and attribute.
Method to add an reference map entry for an item and attribute. //
Parameter |
Type |
Usage |
Description |
refItem |
item |
required |
The item that is referenced. |
parentItem |
item |
required |
The item that holds the new reference to refItem. |
attribute |
string |
required |
The attribute on parentItem that contains the new reference. |
|
|
|
|
_assert(
condition
: boolean
) :
void
Parameter |
Type |
Usage |
Description |
condition |
boolean |
required |
|
|
|
|
|
_assertIsAttribute(
attribute
: attribute-name-string
) :
void
This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
Parameter |
Type |
Usage |
Description |
attribute |
attribute-name-string |
required |
The attribute to test for being contained by the store. |
|
|
|
|
_assertIsItem(
item
: item
) :
void
This function tests whether the item passed in is indeed an item in the store.
Parameter |
Type |
Usage |
Description |
item |
item |
required |
The item to test for being contained by the store. |
|
|
|
|
_containsValue(
item
: item
attribute
: attribute-name-string
value
: anything
regexp
: RegExp
) :
void
Internal function for looking at the values contained by the item.
Internal function for looking at the values contained by the item. This
function allows for denoting if the comparison should be case sensitive for
strings or not (for handling filtering cases where string case should not matter)
Parameter |
Type |
Usage |
Description |
item |
item |
required |
The data item to examine for attribute values. |
attribute |
attribute-name-string |
required |
The attribute to inspect. |
value |
anything |
required |
The value to match. |
regexp |
RegExp |
optional |
Optional regular expression generated off value if value was of string type to handle wildcarding.
If present and attribute values are string, then it can be used for comparison instead of 'value' |
|
|
|
|
_dumpReferenceMap(
) :
void
Function to dump the reverse reference map of all items in the store for debug purposes.
Function to dump the reverse reference map of all items in the store for debug purposes.
|
|
|
|
_fetchItems(
keywordArgs
: Object
findCallback
: Function
errorCallback
: Function
) :
void
See dojo.data.util.simpleFetch.fetch()
Parameter |
Type |
Usage |
Description |
keywordArgs |
Object |
required |
|
findCallback |
Function |
required |
|
errorCallback |
Function |
required |
|
|
|
|
|
_flatten(
value
: anything
) :
void
Parameter |
Type |
Usage |
Description |
value |
anything |
required |
|
|
|
|
|
_forceLoad(
) :
void
Internal function to force a load of the store if it hasn't occurred yet. This is required
for specific functions to work properly.
|
|
|
|
_getIdentifierAttribute(
) :
void
|
|
|
|
_getItemByIdentity(
identity
: Object
) :
void
Internal function to look an item up by its identity map.
Parameter |
Type |
Usage |
Description |
identity |
Object |
required |
|
|
|
|
|
_getItemsArray(
queryOptions
: object
) :
void
Internal function to determine which list of items to search over.
Parameter |
Type |
Usage |
Description |
queryOptions |
object |
optional |
The query options parameter, if any. |
|
|
|
|
_getItemsFromLoadedData(
dataObject
: Object
) :
void
Function to parse the loaded data into item format and build the internal items array.
Function to parse the loaded data into item format and build the internal items array.
Parameter |
Type |
Usage |
Description |
dataObject |
Object |
required |
The JS data object containing the raw data to convery into item format. |
|
|
|
|
_getNewFileContentString(
) :
void
Generate a string that can be saved to a file.
|
|
|
|
_getValueOrValues(
item
: item
attribute
: attribute-name-string
) :
void
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
|
|
|
|
_handleQueuedFetches(
) :
void
Internal function to execute delayed request in the store.
Execute any deferred fetches now.
|
|
|
|
_isEmpty(
something
: The
) :
void
Function to determine if an array or object has no properties or values.
Parameter |
Type |
Usage |
Description |
something |
The |
required |
array or object to examine. |
|
|
|
|
_removeArrayElement(
array
: Array
element
: anything
) :
void
Parameter |
Type |
Usage |
Description |
array |
Array |
required |
|
element |
anything |
required |
|
|
|
|
|
_removeReferenceFromMap(
refItem
: item
parentItem
: item
attribute
: strin
) :
void
Method to remove an reference map entry for an item and attribute.
Method to remove an reference map entry for an item and attribute. This will
also perform cleanup on the map such that if there are no more references at all to
the item, its reference object and entry are removed.
Parameter |
Type |
Usage |
Description |
refItem |
item |
required |
The item that is referenced. |
parentItem |
item |
required |
The item holding a reference to refItem. |
attribute |
strin |
required |
The attribute on parentItem that contains the reference. |
|
|
|
|
_setValueOrValues(
item
: item
attribute
: attribute-name-string
newValueOrValues
: anything
callOnSet
: boolean
) :
void
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
newValueOrValues |
anything |
required |
|
callOnSet |
boolean |
optional |
|
|
|
|
|
close(
request
: object
) :
void
Over-ride of base close function of ItemFileReadStore to add in check for store state.
Over-ride of base close function of ItemFileReadStore to add in check for store state.
If the store is still dirty (unsaved changes), then an error will be thrown instead of
clearing the internal state for reload from the url.
Parameter |
Type |
Usage |
Description |
request |
object |
optional |
|
|
|
|
|
constructor(
keywordParameters
: object
) :
void
constructor
Parameter |
Type |
Usage |
Description |
keywordParameters |
object |
required |
typeMap: object) |
|
|
|
|
containsValue(
item
: item
attribute
: attribute-name-string
value
: anything
) :
void
See dojo.data.api.Read.containsValue()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
value |
anything |
required |
|
|
|
|
|
deleteItem(
item
: item
) :
void
See dojo.data.api.Write.deleteItem()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
|
|
|
|
fetch(
request
: Object
) :
void
The simpleFetch mixin is designed to serve as a set of function(s) that can
be mixed into other datastore implementations to accelerate their development.
The simpleFetch mixin should work well for any datastore that can respond to a _fetchItems()
call by returning an array of all the found items that matched the query. The simpleFetch mixin
is not designed to work for datastores that respond to a fetch() call by incrementally
loading items, or sequentially loading partial batches of the result
set. For datastores that mixin simpleFetch, simpleFetch
implements a fetch method that automatically handles eight of the fetch()
arguments -- onBegin, onItem, onComplete, onError, start, count, sort and scope
The class mixing in simpleFetch should not implement fetch(),
but should instead implement a _fetchItems() method. The _fetchItems()
method takes three arguments, the keywordArgs object that was passed
to fetch(), a callback function to be called when the result array is
available, and an error callback to be called if something goes wrong.
The _fetchItems() method should ignore any keywordArgs parameters for
start, count, onBegin, onItem, onComplete, onError, sort, and scope.
The _fetchItems() method needs to correctly handle any other keywordArgs
parameters, including the query parameter and any optional parameters
(such as includeChildren). The _fetchItems() method should create an array of
result items and pass it to the fetchHandler along with the original request object
-- or, the _fetchItems() method may, if it wants to, create an new request object
with other specifics about the request that are specific to the datastore and pass
that as the request object to the handler.
For more information on this specific function, see dojo.data.api.Read.fetch()
Parameter |
Type |
Usage |
Description |
request |
Object |
optional |
|
|
|
|
|
fetchItemByIdentity(
keywordArgs
: Object
) :
void
See dojo.data.api.Identity.fetchItemByIdentity()
Parameter |
Type |
Usage |
Description |
keywordArgs |
Object |
required |
|
|
|
|
|
getAttributes(
item
: item
) :
void
See dojo.data.api.Read.getAttributes()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
|
|
|
|
getFeatures(
) :
void
See dojo.data.api.Read.getFeatures()
|
|
|
|
getIdentity(
item
: item
) :
void
See dojo.data.api.Identity.getIdentity()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
|
|
|
|
getIdentityAttributes(
item
: item
) :
void
See dojo.data.api.Identity.getIdentifierAttributes()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
|
|
|
|
getLabel(
item
: item
) :
void
See dojo.data.api.Read.getLabel()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
|
|
|
|
getLabelAttributes(
item
: item
) :
void
See dojo.data.api.Read.getLabelAttributes()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
|
|
|
|
getValue(
item
: item
attribute
: attribute-name-string
defaultValue
: value
) :
void
See dojo.data.api.Read.getValue()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
defaultValue |
value |
optional |
|
|
|
|
|
getValues(
item
: item
attribute
: attribute-name-string
) :
void
See dojo.data.api.Read.getValues()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
|
|
|
|
hasAttribute(
item
: item
attribute
: attribute-name-string
) :
void
See dojo.data.api.Read.hasAttribute()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
|
|
|
|
isDirty(
item
: item
) :
void
See dojo.data.api.Write.isDirty()
Parameter |
Type |
Usage |
Description |
item |
item |
optional |
|
|
|
|
|
isItem(
something
: anything
) :
void
See dojo.data.api.Read.isItem()
Parameter |
Type |
Usage |
Description |
something |
anything |
required |
|
|
|
|
|
isItemLoaded(
something
: anything
) :
void
See dojo.data.api.Read.isItemLoaded()
Parameter |
Type |
Usage |
Description |
something |
anything |
required |
|
|
|
|
|
loadItem(
keywordArgs
: object
) :
void
See dojo.data.api.Read.loadItem()
Parameter |
Type |
Usage |
Description |
keywordArgs |
object |
required |
|
|
|
|
|
newItem(
keywordArgs
: Object
parentInfo
: Object
) :
void
See dojo.data.api.Write.newItem()
Parameter |
Type |
Usage |
Description |
keywordArgs |
Object |
optional |
|
parentInfo |
Object |
optional |
|
|
|
|
|
onDelete(
deletedItem
: item
) :
void
See dojo.data.api.Notification.onDelete()
Parameter |
Type |
Usage |
Description |
deletedItem |
item |
required |
|
|
|
|
|
onNew(
newItem
: item
parentInfo
: object
) :
void
See dojo.data.api.Notification.onNew()
Parameter |
Type |
Usage |
Description |
newItem |
item |
required |
|
parentInfo |
object |
optional |
|
|
|
|
|
onSet(
item
: item
attribute
: attribute-name-string
oldValue
: object
newValue
: object
) :
void
See dojo.data.api.Notification.onSet()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
oldValue |
object |
required |
| array |
newValue |
object |
required |
| array |
|
|
|
|
revert(
) :
void
See dojo.data.api.Write.revert()
|
|
|
|
save(
keywordArgs
: object
) :
void
See dojo.data.api.Write.save()
Parameter |
Type |
Usage |
Description |
keywordArgs |
object |
required |
|
|
|
|
|
setValue(
item
: item
attribute
: attribute-name-string
value
: almost
) :
void
See dojo.data.api.Write.set()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
value |
almost |
required |
anything |
|
|
|
|
setValues(
item
: item
attribute
: attribute-name-string
values
: array
) :
void
See dojo.data.api.Write.setValues()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
values |
array |
required |
|
|
|
|
|
unsetAttribute(
item
: item
attribute
: attribute-name-string
) :
void
See dojo.data.api.Write.unsetAttribute()
Parameter |
Type |
Usage |
Description |
item |
item |
required |
|
attribute |
attribute-name-string |
required |
|
|