org.eclnt.util.valuemgmt

## Class UniqueIdCreator

- java.lang.Object
- - org.eclnt.util.valuemgmt.UniqueIdCreator

-     public class UniqueIdCreator
      extends java.lang.Object

  Utility class for creating unique ids.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UniqueIdCreator()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static long` | `createCounter()` Increases the process counter that is used in `createId()`.
    `static java.lang.String` | `createId()` Creates a unique id based on a prefix which is built one time per process.
    `static java.lang.String` | `createRandomId()` Creates a unique id based on current time stamp, random number and process counter.
    `static java.lang.String` | `createUUID()` Creates a UUID according to UUID management of Java 1.7.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UniqueIdCreator

          public UniqueIdCreator()

  - ### Method Detail

    - #### createId

          public static java.lang.String createId()

      Creates a unique id based on a prefix which is built one time per process. The prefix consists out of the current timestamp and a random value. Values are then created by adding a counter. This id is a counted if and must NOT be used for any purpose demanding some unique id that is not predictable!

    - #### createRandomId

          public static java.lang.String createRandomId()

      Creates a unique id based on current time stamp, random number and process counter.

    - #### createCounter

          public static long createCounter()

      Increases the process counter that is used in `createId()`.

    - #### createUUID

          public static java.lang.String createUUID()

      Creates a UUID according to UUID management of Java 1.7. The result is a 36 char long UUID following the common UUID format for 128bit based UUIDs.
      If Java 1.7 is not available then the method `createRandomId()` is used for creating the id.

Copyright © CaptainCasa Gmbh. All Rights Reserved.