List of usage examples for java.util UUID toString
public String toString()
From source file:org.trustedanalytics.servicebroker.hdfs.users.UaaUsersOperations.java
private UUID getUserId(UUID user) throws ServiceBrokerException { UaaClient uaaClient = new UaaClient(createRestTemplate(), uaaConfiguration.getUri()); return uaaClient.findUserIdByName(user.toString()) .orElseThrow(() -> new ServiceBrokerException("Can't create user " + user)).getGuid(); }
From source file:org.noorganization.instalist.comm.message.EntryInfo.java
public void setListUUID(UUID listUUID) { mListUUID = (listUUID != null ? listUUID.toString() : null); }
From source file:lab.example.service.LotteryService.java
public void run(String... args) { try {/*from w ww .j a va 2 s.co m*/ while (true) { final UUID uuid = UUID.randomUUID(); final Integer randomPrice = 1 + (int) (Math.random() * 36); Lot lot = new Lot(uuid.toString(), randomPrice); stockSave(lot); Thread.sleep(10 * 1000); } } catch (Exception e) { logger.error(e.getMessage(), e); } }
From source file:com.esri.geoportal.harvester.beans.TaskManagerBean.java
@Override public boolean update(UUID id, TaskDefinition taskDef) throws CrudlException { taskDef.setRef(id.toString()); try (Connection connection = dataSource.getConnection(); PreparedStatement st = connection .prepareStatement("UPDATE TASKS SET taskDefinition = ? WHERE ID = ?");) { st.setString(1, serialize(taskDef)); st.setString(2, id.toString());/*w ww. ja v a 2s . co m*/ return st.executeUpdate() > 0; } catch (SQLException | IOException ex) { throw new CrudlException("Error selecting task", ex); } }
From source file:org.trustedanalytics.servicebroker.hdfs.users.UaaUsersOperations.java
public UUID createUser(UUID user, String password) throws ServiceBrokerException { UaaClient uaaClient = new UaaClient(createRestTemplate(), uaaConfiguration.getUri()); uaaClient.createUser(user.toString(), password); return getUserId(user); }
From source file:org.ng200.openolympus.services.StorageService.java
@PreAuthorize(SecurityExpressionConstants.IS_ADMIN) public Path createTaskDescriptionFileStorage(Task task) throws IOException { final UUID uuid = UUID.randomUUID(); final String idString = System.currentTimeMillis() + "_" + uuid.toString(); final Path file = FileSystems.getDefault().getPath(this.storagePath, "tasks", "descriptions", idString); FileAccess.createDirectories(file);/* w w w .j a va 2s.c o m*/ FileAccess.createFile(file.resolve("source")); task.setDescriptionFile(idString); return file; }
From source file:org.trustedanalytics.metricsprovider.rest.MetricsDownloadTasks.java
public CompletableFuture<Long> getPublicDatasetCount(UUID org) { String path = dataCatalogBaseUrl + "/rest/datasets/count?onlyPublic=true&orgs=" + org.toString(); return getAsynchronouslyWithLogging(path, Long.class, org, "getPublicDatasetCount, org=" + org); }
From source file:eu.cloud4soa.frontend.commons.server.semanticdao.BaseRepository.java
private String getUUID() { UUID uuid = UUID.randomUUID(); return uuid.toString(); }
From source file:org.trustedanalytics.metricsprovider.rest.MetricsDownloadTasks.java
public CompletableFuture<Long> getPrivateDatasetCount(UUID org) { String path = dataCatalogBaseUrl + "/rest/datasets/count?onlyPrivate=true&orgs=" + org.toString(); return getAsynchronouslyWithLogging(path, Long.class, org, "getPrivateDatasetCount, org=" + org); }
From source file:org.noorganization.instalist.comm.message.EntryInfo.java
public void setProductUUID(UUID productUUID) { mProductUUID = (productUUID != null ? productUUID.toString() : null); }