Example usage for java.util UUID randomUUID

List of usage examples for java.util UUID randomUUID

Introduction

In this page you can find the example usage for java.util UUID randomUUID.

Prototype

public static UUID randomUUID() 

Source Link

Document

Static factory to retrieve a type 4 (pseudo randomly generated) UUID.

Usage

From source file:com.clican.pluto.dataprocess.dpl.function.impl.BaseFunction.java

public BaseFunction() {
    this.id = UUID.randomUUID().toString();
}

From source file:edu.stanford.junction.api.activity.JunctionActor.java

public JunctionActor() {
    actorID = UUID.randomUUID().toString();
    mRoles = new String[] {};
}

From source file:io.helixservice.feature.restservice.error.jsonapi.ErrorData.java

public ErrorData(String code, String title) {
    this.id = UUID.randomUUID().toString();
    this.code = code;
    this.title = title;
}

From source file:com.alu.e3.prov.lifecycle.IDHelper.java

public static String generateUID() {
    return UUID.randomUUID().toString().replace("-", "");
}

From source file:com.artivisi.iso8583.persistence.service.MapperServiceImpl.java

@Override
public void save(Mapper mapper) {
    if (mapper.getId() == null) {
        mapper.setId(UUID.randomUUID().toString());
    }/*ww  w.  j  a va 2  s.  c o  m*/
    for (Integer key : mapper.getDataElement().keySet()) {
        DataElement de = mapper.getDataElement().get(key);
        if (de.getId() == null) {
            de.setId(UUID.randomUUID().toString());
        }
        de.setMapper(mapper);
    }
    mapperDao.save(mapper);
}

From source file:com.formkiq.core.form.bean.FormJSONUUIDFieldInterceptor.java

@Override
public void setValue(final FormJSON form) {
    FormFinder.findFieldsByType(form, FormJSONFieldType.UUID).forEach(s -> {
        if (isEmpty(s.getValue())) {
            s.setValue(UUID.randomUUID().toString());
        }//  ww  w  .j a  va 2  s .c o m
    });
}

From source file:lydichris.smashbracket.persistence.UserPersistence.java

public User createUser(String username, byte[] passwordHash, String email) {
    UUID uuid = UUID.randomUUID();
    String SQL = "insert into users (username, Userid, passwordhash, email) values (?, ?, ?, ?)";

    jdbcTemplateObject.update(SQL, username, uuid.toString(), passwordHash, email);
    return new User(uuid.toString(), username, email);
}

From source file:com.snowplowanalytics.snowplow.tracker.core.Util.java

public static String getEventId() {
    return UUID.randomUUID().toString();
}

From source file:com.allogy.mime.MimeGeneratingInputStreamTest.java

@Before
public void setUp() {
    headers = new ArrayList<Header>();
    for (int i = 0; i < 3; i++) {
        Header header = new BasicHeader(UUID.randomUUID().toString(), UUID.randomUUID().toString());
        headers.add(header);// w ww.j  a va  2  s  . c o m
    }

    body = UUID.randomUUID().toString();
    bodyStream = IOUtils.toInputStream(body);
}

From source file:nu.yona.server.messaging.entities.MessageDestination.java

public static MessageDestination createInstance(PublicKey publicKey) {
    return new MessageDestination(UUID.randomUUID(), publicKey);
}