|
|
|
_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. |
|
|
|
|
_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' |
|
|
|
|
_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 |
|
|
|
|
|
_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.
|
|
|
|
_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. |
|
|
|
|
_handleQueuedFetches(
) :
void
Internal function to execute delayed request in the store.
Execute any deferred fetches now.
|
|
|
|
close(
request
: dojo.data.api.Request
) :
void
See dojo.data.api.Read.close()
Parameter |
Type |
Usage |
Description |
request |
dojo.data.api.Request |
required |
|| keywordArgs || null |
|
|
|
|
constructor(
keywordParameters
) :
void
constructor
Parameter |
Type |
Usage |
Description |
keywordParameters |
|
required |
|
|
|
|
|
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 |
|
|
|
|
|
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 |
|
|
|
|
|
getItemByIdentity(
id
) :
void
Parameter |
Type |
Usage |
Description |
id |
|
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 |
|
|
|
|
|
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 |
|
|