The PersonalizationParameters class is generated automatically for managing personalization keys. When a personalization parameter value is changed, the call to save automatically propagates the change to the server.
Consider a personalization key "pkcity" that is associated with the synchronization parameter "cityname". The following example shows how to get and set personalization key values:
//get personalization key values SampleApp_PersonalizationParameters *pp = [SUP101SUP101DB getPersonalizationparameters]; MBOLogInfo(@”Personalization Parameter for City = %@”, pp.PKCity); //Set personalization key values pp.PKCity = @”Hull”; [pp.save]; //save the new pk value. while ([SUP101SUP101DB hasPendingOperations]) [NSThread sleepForTimeInterval:0.2];
An operation can have a parameter that is one of the Sybase Unwired Platform list types (such as SUPIntList, SUPStringList, or SUPObjectList). For example, consider a method for an entity Customer with signature AnOperation:
SUPIntList *intlist = [SUPIntList getInstance]; [intlist add:1]; [intlist add:2]; Customer *thecustomer = [Customer find:101]; [thecustomer AnOperation:intlist];
If a synchronization parameter is personalized, you can overwrite the value of that parameter with the personalization value.