on 07-03-2006 10:45 AM
Hi all,
i have a application with SYNCBO s01 (MI 2.5 sp15).
I have to create a page with a summary of all delta data saved in client.
I use only sync BO for save all my data (es: ZALLDATA)and I have to read and print (in the screen) all data saved in this syncBO.
Can someone help me?
hello rocco,
try this.
SyncBoOutDeltaFacade deltFac = SmartSyncRuntime.getInstance().getSyncBoOutDeltaFacade();
MeIterator allDelta = deltFac.getAllDelta();
while(allDelta.hasNext()){
SyncBoOutDelta outDelta = (SyncBoOutDelta)allDelta.next();
//boDescriptor is the one you want to look for
if(outDelta.getSyncBoDescriptor()==boDescriptor){
//do whatever you want
System.out.println("SyncKey:"+outDelta.getSyncKey()+" Action:" + outDelta.getAction());
}
}
take note that MI merges the update to your SyncBo instance;
i.e. no delta history available. thus you won't be able
to know which field was changed on what time.
regards
jo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello rocco,
using the info i.e. the synckey and the syncbodescriptor
of your syncbooutdelta instance, you can retrieve the
syncbo instance from the data repository. use the api:
SyncBoDataFacade.getSyncBo(syncBoDescriptor, syncKey)
now, if you want to know which row was inserted or updated,
you have to retrieve the rowoutdeltas using the method
SyncBoOutDelta.getRowChanges(). this method will return
an MeIterator instance of the RowOutDelta elements. and
for every RowOutDelta instance in the iterator, you can
get the row values using the method
RowOutDelta.getChangedFieldValues()
which will return again an MeIterator of your field
values. if the row was deleted, you won't have any
changedFieldValues instead you will only have the key,
rowdescriptor, seqNo and the action.
for the updated and inserted rows, you can also directly
retrieve the row instances using the rowdescriptor and
key from the datafacade.
hope this helps.
jo
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.