define(['ojs/ojcollectiondataprovider'], function(CollectionDataProvider) {
// Application should call API on CollectionDataProvider
})
Typescript Import Format
//This class is exported directly as module. To import it import CollectionDataProvider= require("ojs/ojcollectiondataprovider");
Generic Parameters
Parameter
Description
K
Type of Key
D
Type of Data
JET In Typescript
A detailed description of working with JET elements and classes in your typescript project can be found at:
JET Typescript Usage.
Final classes in JET
Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.
Return the total number of rows in this dataprovider
Returns:
Returns a Promise which resolves to the total number of rows. -1 is unknown row count.
Type
Promise.<number>
isEmpty() : {"yes"|"no"|"unknown"}
Return a string that indicates if this data provider is empty
Returns:
a string that indicates if this data provider is empty. Valid values are:
"yes": this data provider is empty.
"no": this data provider is not empty.
"unknown": it is not known if this data provider is empty until a fetch is made.