|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
A collection of SyncObjects used for backup/restore and
synchronization.
Each application that supports synchronization maintains a collection of synchronized objects, with each collection identified by a unique name.
SyncObject,
SyncItem,
SyncManager.enableSynchronization(net.rim.device.api.synchronization.SyncCollection),
StateInfoListener| Method Summary | ||
|
boolean |
addSyncObject(SyncObject object)
Adds a SyncObject to this SyncCollection. |
|
void |
beginTransaction()
Starts a transaction. |
|
void |
clearSyncObjectDirty(SyncObject object)
Marks the specified SyncObject as not dirty. |
|
void |
endTransaction()
Ends a transaction. |
|
SyncConverter |
getSyncConverter()
Returns the synchronization message converter ( SyncConverter)
for this SyncCollection. |
|
String |
getSyncName()
Returns the name of this SyncCollection. |
|
String |
getSyncName(Locale locale)
Returns the translated user-friendly name of this SyncCollection. |
|
SyncObject |
getSyncObject(int uid)
Return the SyncObject in this SyncCollection
with the given UID. |
|
int |
getSyncObjectCount()
Returns a the number of SyncObjects in this SyncCollection. |
|
SyncObject[] |
getSyncObjects()
Returns an array of SyncObjects representing all
SyncObjects in this SyncCollection. |
|
int |
getSyncVersion()
Returns the current version number of this SyncCollection. |
|
boolean |
isSyncObjectDirty(SyncObject object)
Determines whether a specified SyncObject is dirty. |
|
boolean |
removeAllSyncObjects()
Called to remove all SyncObjects from the SyncCollection. |
|
boolean |
removeSyncObject(SyncObject object)
Removes a SyncObject from this SyncCollection. |
|
void |
setSyncObjectDirty(SyncObject object)
Marks the specified SyncObject as dirty. |
|
boolean |
updateSyncObject(SyncObject oldObject,
SyncObject newObject)
Updates a SyncObject in this SyncCollection. |
| Method Detail |
public boolean addSyncObject(SyncObject object)
SyncObject to this SyncCollection.
The SyncObject's dirty bit is set to clean by default.
object - The SyncObject to be added to the collection.true if the operation was successful;
false otherwise.public void beginTransaction()
Transactions are required to execute synchronizations that involve a
large number of data records. The beginTransaction method
is invoked by the SyncManager before adding, modifying
or deleting a data record serially.
endTransaction()public void clearSyncObjectDirty(SyncObject object)
SyncObject as not dirty.
"Dirty" refers to whether or not the object has been modified on the handheld.
object - The SyncObject in question.public void endTransaction()
Transactions are required to execute synchronizations that involve a
large number of data records. The endTransaction method is
invoked to signal the end of the transaction.
beginTransaction()public SyncConverter getSyncConverter()
SyncConverter)
for this SyncCollection.
A SyncConverter serializes SyncObjects and
processes serialized data to create SyncObjects.
SyncConverterpublic String getSyncName()
SyncCollection.
NOTE: The name that is returned must be unique across all
SyncCollections.SyncCollection.public String getSyncName(Locale locale)
SyncCollection.
If this returns null, then the result from getSyncName()
will be shown instead.
locale - The locale (specific region) of the associated collection.public SyncObject getSyncObject(int uid)
SyncObject in this SyncCollection
with the given UID.uid - The UID of the SyncObject to retrieve.SyncObject with the given ID or null if no
such SyncObject exists.public int getSyncObjectCount()
SyncObjects in this SyncCollection.SyncObjects in this SyncCollection.public SyncObject[] getSyncObjects()
SyncObjects representing all
SyncObjects in this SyncCollection.
The synchronization manager assumes that it is free to manipulate this array as it requires.
SyncObjects in this SyncCollection.SyncObjectpublic int getSyncVersion()
SyncCollection.SyncCollection.public boolean isSyncObjectDirty(SyncObject object)
SyncObject is dirty.
"Dirty" refers to whether or not the object has been modified on the handheld.
object - The object in question.true if the SyncObject is dirty;
false otherwise.public boolean removeAllSyncObjects()
SyncObjects from the SyncCollection.true if the update succeeded;
false otherwise.public boolean removeSyncObject(SyncObject object)
SyncObject from this SyncCollection.object - The object to be removed.true if the operation was successful;
false otherwise.public void setSyncObjectDirty(SyncObject object)
SyncObject as dirty.
"Dirty" refers to whether or not the object has been modified on the handheld.
object - The SyncObject in question.public boolean updateSyncObject(SyncObject oldObject, SyncObject newObject)
SyncObject in this SyncCollection.
The method accepts the old object to be replaced as well as the new
object that will replace it in the collection.
The SyncObject should subsequently be marked clean.
oldObject - The object to be updated.newobject - The object to take its place.true if the operation was successful;
false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.