public class Uid extends Object
| Constructor and Description |
|---|
Uid() |
| Modifier and Type | Method and Description |
|---|---|
static String |
createTimeDependentKey()
Create a universal unique key which increases over time
|
static String |
createUniqueKey()
Create a universal unique key for a new record
|
static String |
generateRandomId(int iLength,
String sCharset,
byte byCategory)
Generate a random identifier of a given length
|
static String |
generateReverseTimestampId()
Generate a reverse timestamp plus random int identifier of 32 characters length
The identifier will be composed of Long.MAX_VALUE-Current Time in Milliseconds followed by a random 32 bits integer
|
public static String generateRandomId(int iLength, String sCharset, byte byCategory) throws StringIndexOutOfBoundsException
iLength - int Length of identifier to be generated /between 1 and 4096 characters)sCharset - String Character set to be used for generating the identifierbyCategory - byte Character category, must be one of Character.UNASSIGNED, Character.UPPERCASE_LETTER or Character.LOWERCASE_LETTER
If sCharset is null then it is "abcdefghjkmnpqrstuvwxyz23456789" by defaultStringIndexOutOfBoundsExceptionpublic static String createUniqueKey()
public static String createTimeDependentKey()
public static String generateReverseTimestampId()
Copyright © 2001–2019 KnowGate. All rights reserved.