To retrieve data from a local database use the find, findAll, or findByPrimaryKey methods in the MBO class.
The following examples show how to use the find, findAll, or findByPrimaryKey methods in the MBO class to retrieve data.
SampleApp_Customer *customer = [SampleApp_Customer find:101];
SUPObjectList *customers = [SampleApp_Customer findAll] ;
SUPObjectList *customers = [ SampleApp_Customer findAll: 100 take:5];
SUPQuery *myquery = [SUPQuery getInstance]; myquery.testCriteria = [SUPAttributeTest match:@"fname" :@”Erin”]; SUPObjectList* customers = [SampleApp_Customer findWithQuery: myquery]
int count = [SampleApp_Customer countWithQuery:myquery];