Java UUID Create generatorTransactionPath(String namespace)

Here you can find the source of generatorTransactionPath(String namespace)

Description

generator Transaction Path

License

Apache License

Declaration

public static String generatorTransactionPath(String namespace) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.UUID;

public class Main {

    public static String generatorTransactionPath() {
        StringBuilder builder = new StringBuilder();
        builder.append("/").append(generateStringUuid());
        return builder.toString();
    }// w w  w. j a  va2  s  .co m

    public static String generatorTransactionPath(String namespace) {
        StringBuilder builder = new StringBuilder();
        builder.append("/").append(namespace).append("/").append(generateStringUuid());
        return builder.toString();
    }

    /**
     * String uuid
     */
    public static String generateStringUuid() {
        return UUID.randomUUID().toString().replace("-", "").toUpperCase();
    }
}

Related

  1. generateUUIDFromString(String uuid)
  2. generateUUIDName(String filename)
  3. generateUUIDRandom()
  4. generateUuidStringStatic()
  5. generatorToken()
  6. genMonUUID(String prefix)
  7. genMsgId()
  8. genOntologyNS(String base)
  9. genRandom(int length)