SHOW Signed

net.rim.device.api.synchronization
Interface SyncCollection

All Superinterfaces:
Collection
All Known Implementing Classes:
SyncItem

public interface SyncCollection
extends Collection

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.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

Since:
JDE 3.6.0
See Also:
SyncObject, SyncItem, SyncManager.enableSynchronization(net.rim.device.api.synchronization.SyncCollection), StateInfoListener

Method Summary
 Category: Signed  boolean addSyncObject(SyncObject object)
          Adds a SyncObject to this SyncCollection.
 Category: Signed  void beginTransaction()
          Starts a transaction.
 Category: Signed  void clearSyncObjectDirty(SyncObject object)
          Marks the specified SyncObject as not dirty.
 Category: Signed  void endTransaction()
          Ends a transaction.
 Category: Signed  SyncConverter getSyncConverter()
          Returns the synchronization message converter (SyncConverter) for this SyncCollection.
 Category: Signed  String getSyncName()
          Returns the name of this SyncCollection.
 Category: Signed  String getSyncName(Locale locale)
          Returns the translated user-friendly name of this SyncCollection.
 Category: Signed  SyncObject getSyncObject(int uid)
          Return the SyncObject in this SyncCollection with the given UID.
 Category: Signed  int getSyncObjectCount()
          Returns a the number of SyncObjects in this SyncCollection.
 Category: Signed  SyncObject[] getSyncObjects()
          Returns an array of SyncObjects representing all SyncObjects in this SyncCollection.
 Category: Signed  int getSyncVersion()
          Returns the current version number of this SyncCollection.
 Category: Signed  boolean isSyncObjectDirty(SyncObject object)
          Determines whether a specified SyncObject is dirty.
 Category: Signed  boolean removeAllSyncObjects()
          Called to remove all SyncObjects from the SyncCollection.
 Category: Signed  boolean removeSyncObject(SyncObject object)
          Removes a SyncObject from this SyncCollection.
 Category: Signed  void setSyncObjectDirty(SyncObject object)
          Marks the specified SyncObject as dirty.
 Category: Signed  boolean updateSyncObject(SyncObject oldObject, SyncObject newObject)
          Updates a SyncObject in this SyncCollection.
 

Method Detail

addSyncObject

public boolean addSyncObject(SyncObject object)
Adds a SyncObject to this SyncCollection.

The SyncObject's dirty bit is set to clean by default.

Parameters:
object - The SyncObject to be added to the collection.
Returns:
true if the operation was successful; false otherwise.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

beginTransaction

public void beginTransaction()
Starts a transaction.

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.

Since:
JDE 3.6.0
See Also:
endTransaction()
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

clearSyncObjectDirty

public void clearSyncObjectDirty(SyncObject object)
Marks the specified SyncObject as not dirty.

"Dirty" refers to whether or not the object has been modified on the handheld.

Parameters:
object - The SyncObject in question.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

endTransaction

public void endTransaction()
Ends a transaction.

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.

Since:
JDE 3.6.0
See Also:
beginTransaction()
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getSyncConverter

public SyncConverter getSyncConverter()
Returns the synchronization message converter (SyncConverter) for this SyncCollection.

A SyncConverter serializes SyncObjects and processes serialized data to create SyncObjects.

Returns:
The synchronization message converter for this SyncCollection.
Since:
JDE 3.6.0
See Also:
SyncConverter
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getSyncName

public String getSyncName()
Returns the name of this SyncCollection. NOTE: The name that is returned must be unique across all SyncCollections.
Returns:
The name of this SyncCollection.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getSyncName

public String getSyncName(Locale locale)
Returns the translated user-friendly name of this SyncCollection.

If this returns null, then the result from getSyncName() will be shown instead.

Parameters:
locale - The locale (specific region) of the associated collection.
Returns:
The name of this SyncCollection.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getSyncObject

public SyncObject getSyncObject(int uid)
Return the SyncObject in this SyncCollection with the given UID.
Parameters:
uid - The UID of the SyncObject to retrieve.
Returns:
The SyncObject with the given ID or null if no such SyncObject exists.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getSyncObjectCount

public int getSyncObjectCount()
Returns a the number of SyncObjects in this SyncCollection.
Returns:
The number of SyncObjects in this SyncCollection.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getSyncObjects

public SyncObject[] getSyncObjects()
Returns an array of SyncObjects representing all SyncObjects in this SyncCollection.

The synchronization manager assumes that it is free to manipulate this array as it requires.

Returns:
An array of SyncObjects in this SyncCollection.
Since:
JDE 3.6.0
See Also:
SyncObject
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getSyncVersion

public int getSyncVersion()
Returns the current version number of this SyncCollection.
Returns:
The current version number of this SyncCollection.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

isSyncObjectDirty

public boolean isSyncObjectDirty(SyncObject object)
Determines whether a specified SyncObject is dirty.

"Dirty" refers to whether or not the object has been modified on the handheld.

Parameters:
object - The object in question.
Returns:
true if the SyncObject is dirty; false otherwise.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

removeAllSyncObjects

public boolean removeAllSyncObjects()
Called to remove all SyncObjects from the SyncCollection.
Returns:
true if the update succeeded; false otherwise.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

removeSyncObject

public boolean removeSyncObject(SyncObject object)
Removes a SyncObject from this SyncCollection.
Parameters:
object - The object to be removed.
Returns:
true if the operation was successful; false otherwise.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

setSyncObjectDirty

public void setSyncObjectDirty(SyncObject object)
Marks the specified SyncObject as dirty.

"Dirty" refers to whether or not the object has been modified on the handheld.

Parameters:
object - The SyncObject in question.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

updateSyncObject

public boolean updateSyncObject(SyncObject oldObject,
                                SyncObject newObject)
Updates a 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.

Parameters:
oldObject - The object to be updated.
newobject - The object to take its place.
Returns:
true if the operation was successful; false otherwise.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


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.