Retrieve a UUID field.

@param type field type
@return UUID instance
2899
public UUID getUUID(FastTrackField type)
   {
      String value = getString(type);
      UUID result = null;
      if (value != null && !value.isEmpty() && value.length() >= 36)
      {
         if (value.startsWith("{"))
         {
            value = value.substring(1, value.length() - 1);
         }
         if (value.length() > 16)
         {
            value = value.substring(0, 36);
         }
         result = UUID.fromString(value);
      }
      return result;
   }
160025
public static Optional<Field> getField(Class<?> type, final String fieldName) {
        Optional<Field> field = Iterables.tryFind(newArrayList(type.getDeclaredFields()), havingFieldName(fieldName));

        if (!field.isPresent() && type.getSuperclass() != null){
            field = getField(type.getSuperclass(), fieldName);
        }

        return field;
    }
1011800
public FieldLocation getFieldLocation(FieldType type)
   {
      FieldLocation result = null;

      FieldItem item = m_map.get(type);
      if (item != null)
      {
         result = item.getFieldLocation();
      }
      return result;
   }
1264478
public static UUID getUUID4Id(final long _typeId)
        throws CacheReloadException
    {
        UUID ret = null;
        final Cache<Long, Type> cache = InfinispanCache.get().<Long, Type>getCache(Type.IDCACHE);
        if (cache.containsKey(_typeId)) {
            ret = cache.get(_typeId).getUUID();
        } else {
            Connection con = null;
            try {
                con = Context.getConnection();
                PreparedStatement stmt = null;
                try {
                    stmt = con.prepareStatement(Type.SQL_ID);
                    stmt.setObject(1, _typeId);
                    final ResultSet rs = stmt.executeQuery();
                    while (rs.next()) {
                        ret = UUID.fromString(rs.getString(2).trim());
                    }
                    rs.close();
                } finally {
                    if (stmt != null) {
                        stmt.close();
                    }
                }
                con.commit();
            } catch (final SQLException e) {
                throw new CacheReloadException("could not read child type ids", e);
            } catch (final EFapsException e) {
                throw new CacheReloadException("could not read child type ids", e);
            } finally {
                try {
                    if (con != null && !con.isClosed()) {
                        con.close();
                    }
                } catch (final SQLException e) {
                    throw new CacheReloadException("Cannot read a type for an attribute.", e);
                }
            }
        }
        return ret;
    }
247038
def uuid(self, type, val):
        """"""
        picker = lambda x: x.get('uuid', x)
        return self._get((type, val), picker)
1169789
public void getField(Type owner, String name, Type type) {
    adapter.getField(owner, name, type);
  }
1165942
public Optional<MapperInstance> getSerializer( JType type ) {
        return Optional.fromNullable( serializers.get( type.getQualifiedSourceName() ) );
    }
373319
public String getUuid() {
    if (ExperimentUUID_Type.featOkTst && ((ExperimentUUID_Type)jcasType).casFeat_uuid == null)
      jcasType.jcas.throwFeatMissing("uuid", "edu.cmu.lti.oaqa.framework.types.ExperimentUUID");
    return jcasType.ll_cas.ll_getStringValue(addr, ((ExperimentUUID_Type)jcasType).casFeatCode_uuid);}
847346
static public function generate($type, $fmt = self::FMT_BYTE,
                                  $node = "", $ns = "") {
    $func = self::$m_generate[$type];
    if (!isset($func))
      return null;
    $conv = self::$m_convert[self::FMT_FIELD][$fmt];

    $uuid = self::$func($ns, $node);
    return self::$conv($uuid);
  }
271344
@Override
    public T get(final UUID _uuid)
    {
        if (!hasEntries()) {
            initialize(AbstractAutomaticCache.class);
        }
        return getCache4UUID().get(_uuid);
    }
703671
protected static UUID extractUUID(AttributeProvider provider) {
		AttributeValue value;

		value = provider.getAttribute(UUID_ATTR);
		if (value != null) {
			try {
				return value.getUUID();
			} catch (InvalidAttributeTypeException e) {
				//
			} catch (AttributeNotInitializedException e) {
				//
			}
		}

		value = provider.getAttribute(ID_ATTR);
		if (value != null) {
			try {
				return value.getUUID();
			} catch (InvalidAttributeTypeException e) {
				//
			} catch (AttributeNotInitializedException e) {
				//
			}
		}

		return null;
	}
604637
public String getCustomData(int pathId, String clientUUID, String type) throws Exception {
        PreparedStatement statement = null;
        ResultSet results = null;
        String data = "";

        try (Connection sqlConnection = sqlService.getConnection()) {
            String queryString = "SELECT " + type + " FROM " + Constants.DB_TABLE_REQUEST_RESPONSE +
                " WHERE " + Constants.REQUEST_RESPONSE_PATH_ID + " = ? " +
                " AND " + Constants.GENERIC_CLIENT_UUID + " = ?";
            statement = sqlConnection.prepareStatement(queryString);
            statement.setInt(1, pathId);
            statement.setString(2, clientUUID);

            results = statement.executeQuery();
            if (results.next()) {
                data = results.getString(type);
            }
            results.close();
            statement.close();
        } catch (Exception e) {

        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }

        return data;
    }
841433
public String getUuid()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getUuid");
    String uuid = null;
    if(_outputHandler!=null)
    {
      uuid = _outputHandler.getTopicSpaceUuid().toString();
    }
    else
    {
      uuid = _anycastInputHandler.getBaseDestinationHandler().
              getUuid().toString();
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getUuid", uuid);
    return uuid;
  }
259275
public Optional<MapperInstance> getKeySerializer( JType type ) {
        return Optional.fromNullable( keySerializers.get( type.getQualifiedSourceName() ) );
    }
434427
public static PactDslRootValue uuid() {
    PactDslRootValue value = new PactDslRootValue();
    value.generators.addGenerator(Category.BODY, "", UuidGenerator.INSTANCE);
    value.setValue("e2490de5-5bd3-43d5-b7c4-526e33f71304");
    value.setMatcher(value.regexp(UUID_REGEX));
    return value;
  }
769129
public static  UUID getOrCreateUserToken() {
        UUID userToken;
        if (Request.getPerThreadRequestData().getRequestId() != null) {
            try {
                userToken = UUID.fromString(Request.getPerThreadRequestData().getRequestId());
            } catch (final IllegalArgumentException ignored) {
                userToken = UUIDs.randomUUID();
            }
        } else {
            userToken = UUIDs.randomUUID();
        }
        return userToken;
    }
195214
@Override
    public Type getType() {
        ParameterizedType type = (ParameterizedType) field.getGenericType();
        if (type.getActualTypeArguments()[0] instanceof ParameterizedType) {
            ParameterizedType first = (ParameterizedType) type.getActualTypeArguments()[0];
            return first.getRawType();
        } else {
            return type.getActualTypeArguments()[0];
        }
    }