List of usage examples for java.util UUID toString
public String toString()
From source file:com.khubla.cbean.serializer.impl.json.JSONUUIDFieldSerializer.java
@Override public String serialize(Object o, Field field) throws SerializerException { try {//ww w . jav a 2s . c om final UUID uuid = (UUID) PropertyUtils.getProperty(o, field.getName()); return uuid.toString(); } catch (final Exception e) { throw new SerializerException(e); } }
From source file:com.microsoft.alm.plugin.idea.common.settings.ServerContextState.java
private String restrict(final UUID userId) { if (userId != null) { return userId.toString(); } else {//w w w. j a v a 2s. c om return StringUtils.EMPTY; } }
From source file:org.trustedanalytics.serviceexposer.keyvaluestore.RedisCredentialsStore.java
@Override public Boolean exists(String serviceType, UUID serviceInstanceGuid) { T hashEntry = hashOps.get(serviceType, serviceInstanceGuid.toString()); return (hashEntry != null) ? true : false; }
From source file:com.splunk.shuttl.archiver.filesystem.glacier.FakeArchiveTransferManager.java
private UUID storeUuidForFile(File file) { UUID uuid = UUID.randomUUID(); files.put(uuid.toString(), fileInManagedDirectory(file)); return uuid;// w ww . j ava2 s . c o m }
From source file:org.trustedanalytics.cloud.uaa.UaaClient.java
@Override public void deleteUser(UUID userGuid) { uaaRestTemplate.delete(uaaBaseUrl + "/Users/{id}", userGuid.toString()); }
From source file:com.sinespera.Application.java
@Bean public CommandLineRunner demo(UsuarioRepository repository, RolesRepository rolesRepo) { return (args) -> { // save a couple of customers UUID uuid = UUID.randomUUID(); String randomUUIDString = uuid.toString(); Role rol = new Role(); rol.setIdRol(uuid.toString());/* www . j a v a 2 s .c o m*/ rol.setNombre("ADMIN"); //rolesRepo.save(rol); Usuario u = new Usuario("uno", "Juan Manuel"); u.setUsuario("macuco"); u.setContrasena("macuco"); //u.getRoles().add(rol); //repository.save(u); u = new Usuario("dos", "Maria isabel"); u.setUsuario("isa"); u.setContrasena("isa"); //u.getRoles().add(rol); //repository.save(u); // fetch all customers log.info("Customers found with findAll():"); log.info("-------------------------------"); for (Usuario customer : repository.findAll()) { log.info(customer.toString()); } log.info(""); // fetch an individual customer by ID Usuario customer = repository.findOne("uno"); log.info("Customer found with findOne(1L):"); log.info("--------------------------------"); log.info(customer != null ? customer.toString() : "No hay datos"); log.info(""); // fetch customers by last name log.info("Customer found with findByLastName('Bauer'):"); log.info("--------------------------------------------"); for (Usuario bauer : repository.findByNombre("Juan Manuel")) { log.info(bauer.toString()); } log.info(""); }; }
From source file:edu.unc.lib.dl.cdr.sword.server.deposit.SimpleObjectDepositHandler.java
@Override public DepositReceipt doDeposit(PID destination, Deposit deposit, PackagingType type, SwordConfiguration config, String depositor, String owner) throws Exception { log.debug("Preparing to perform a Simple Object deposit to " + destination.getPid()); PID depositPID = null;/*from w w w . j a va 2s.c om*/ UUID depositUUID = UUID.randomUUID(); depositPID = new PID("uuid:" + depositUUID.toString()); File dir = makeNewDepositDirectory(depositPID.getUUID()); dir.mkdir(); // write deposit file to data directory if (deposit.getFile() != null) { File dataDir = new File(dir, "data"); dataDir.mkdir(); File depositFile = new File(dataDir, deposit.getFilename()); try { FileUtils.moveFile(deposit.getFile(), depositFile); } catch (IOException e) { throw new Error(e); } } // Skip deposit record for this tiny ingest Map<String, String> options = new HashMap<String, String>(); options.put(DepositField.excludeDepositRecord.name(), "true"); registerDeposit(depositPID, destination, deposit, type, depositor, owner, options); return buildReceipt(depositPID, config); }
From source file:de.hybris.platform.marketplaceintegration.utils.MarketplaceintegrationbackofficeLogUtil.java
public String getUUID() { final UUID uuid = UUID.randomUUID(); return uuid.toString().replaceAll("-", ""); }
From source file:de.kaiserpfalzEdv.office.core.impl.KPOEntity.java
@Deprecated // Only for Jackson, JAX-B and JPA! public void setId(UUID id) { this.id = id.toString(); }
From source file:org.noorganization.instalist.comm.message.ListInfo.java
public ListInfo withUUID(UUID uuid) { setUUID(uuid.toString()); return this; }