SHOW Signed
 

net.rim.device.api.synchronization
Class UIDGenerator

java.lang.Object
  |
  +--net.rim.device.api.synchronization.UIDGenerator

public class UIDGenerator
extends Object

A utility class to generate 32-bit unique IDs that can be used for synchronization or any other purpose.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

Since:
JDE 3.6.0

Method Summary
 Category: Signed static int getUID()
          Gets a unique ID.
 Category: Signed static int getUID(int scope)
          Gets a unique ID for a given scope.
 Category: Signed static int getUniqueScopingValue()
          Generates a unique scoping value.
 Category: Signed static long makeLUID(int scope, int value)
          Generates a long form of the scope and value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getUID

public static int getUID()
Gets a unique ID.

Returns:
A unique ID.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

getUID

public static int getUID(int scope)
Gets a unique ID for a given scope.

Parameters:
scope - A unique scoping value.
Returns:
A unique ID.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

getUniqueScopingValue

public static int getUniqueScopingValue()
Generates a unique scoping value.

Returns:
A unique scoping value.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

makeLUID

public static long makeLUID(int scope,
                            int value)
Generates a long form of the scope and value.

This simply places the scope in the upper 32-bits and the value in the lower 32-bits.

Parameters:
scope - The scoping value.
value - The UID for the scope.
Returns:
A long value combining the two Ids.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.



Copyright 1999-2009 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.