Retrieves an object by its UUID.
@param <T> A type parameter. This type will be returned
@param clazz the persistence class to retrive the ID for
@param uuid the uuid of the object to retrieve
@return an object of the specified type
@since 1.0.0
171181
@SuppressWarnings("unchecked")
    public <T> T getObjectByUuid(Class<T> clazz, String uuid) {
        return getObjectByUuid(clazz, UUID.fromString(uuid));
    }
538848
Agent getAgent(UUID id) {
		assert id != null;
		synchronized (getAgentRepositoryMutex()) {
			return this.agents.get(id);
		}
	}
789228
private boolean isUUID(String uuid) {
        try {
            UUID.fromString(uuid);
            return true;
        } catch (Exception ex) {
            return false;
        }
    }
181112
<T> Method getHashKeyGetter(Class<T> clazz) {
        synchronized (hashKeyGetterCache) {
            if ( !hashKeyGetterCache.containsKey(clazz) ) {
                for ( Method method : getRelevantGetters(clazz) ) {
                    if ( method.getParameterTypes().length == 0 && method.isAnnotationPresent(DynamoDBHashKey.class)) {
                        hashKeyGetterCache.put(clazz, method);
                        break;
                    }
                }
            }
        }

        Method hashKeyMethod = hashKeyGetterCache.get(clazz);
        if ( hashKeyMethod == null ) {
            throw new DynamoDBMappingException("Public, zero-parameter hash key property must be annotated with "
                    + DynamoDBHashKey.class);
        }
        return hashKeyMethod;
    }
997330
@SuppressWarnings("unchecked")
    public <T> T getObject(String key, Class<T> clazz) {
        EDBObjectEntry entry = get(key);
        return entry == null ? null : (T) entry.getValue();
    }
863787
public Object find(Class clazz, Object identifier) {
        try {
            return persistenceManager.findById(clazz, identifier);
        } catch (InitializationException ignore){}
        catch (Exception e) {
            e.printStackTrace();
        }

        return null;
    }
703144
public static AccessSet get(final UUID _uuid)
        throws CacheReloadException
    {
        final Cache<UUID, AccessSet> cache = InfinispanCache.get().<UUID, AccessSet>getCache(AccessSet.UUIDCACHE);
        if (!cache.containsKey(_uuid)) {
            AccessSet.getAccessSetFromDB(AccessSet.SQL_UUID, String.valueOf(_uuid));
        }
        return cache.get(_uuid);
    }
68754
public function get($uuid)
    {
        $model = new static::$model;

        $resource = $model::with($model::$localWith)->where($model->getKeyName(), '=', $uuid)->first();

        if (! $resource) {
            throw new NotFoundHttpException('Resource \'' . class_basename(static::$model) . '\' with given UUID ' . $uuid . ' not found');
        }

        $this->authorizeUserAction('view', $resource);

        return $this->response->item($resource, $this->getTransformer());
    }
877209
public final <T> T loadObject(final Class<T> clazz, final Object id) throws Exception {
        return executeInTransaction(new Runnable<T>() {
            @Override
            public T run(final EntityManager entityManager) {
                return loadObject(entityManager, clazz, id);
            }
        });
    }
561376
public <T extends DajlabModelInterface> T get(Class<T> clazz) {

		T ret = null;
		try {
			ret = (T) dajlab.get(clazz.getName());
		} catch (ClassCastException e) {
			e.printStackTrace();
		}
		return ret;
	}
959819
def uuid(self):
        '''
        '''
        pk = self.pkvalue()
        if not pk:
            raise self.DoesNotExist(
                'Object not saved. Cannot obtain universally unique id')
        return self.get_uuid(pk)
1100544
@Override
    public Object get(final String identifier) {
        Declaration decl = getDeclarations().get( identifier );
        if ( decl == null ) {
            throw new IllegalArgumentException( "identifier '" + identifier + "' cannot be found" );
        }
        return get( decl );
    }
784504
@SuppressWarnings("unchecked")
  public <T> T get(String key, Class<T> clazz) {
    return (T) datas.get(key);
  }
821746
@Override
	public int countByUuid(String uuid) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID;

		Object[] finderArgs = new Object[] { uuid };

		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);

		if (count == null) {
			StringBundler query = new StringBundler(2);

			query.append(_SQL_COUNT_COMMERCENOTIFICATIONATTACHMENT_WHERE);

			boolean bindUuid = false;

			if (uuid == null) {
				query.append(_FINDER_COLUMN_UUID_UUID_1);
			}
			else if (uuid.equals("")) {
				query.append(_FINDER_COLUMN_UUID_UUID_3);
			}
			else {
				bindUuid = true;

				query.append(_FINDER_COLUMN_UUID_UUID_2);
			}

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				if (bindUuid) {
					qPos.add(uuid);
				}

				count = (Long)q.uniqueResult();

				finderCache.putResult(finderPath, finderArgs, count);
			}
			catch (Exception e) {
				finderCache.removeResult(finderPath, finderArgs);

				throw processException(e);
			}
			finally {
				closeSession(session);
			}
		}

		return count.intValue();
	}
982802
public static int getIdFor(Class<? extends Tag> clazz) {
        if(!tagToId.containsKey(clazz)) {
            return -1;
        }

        return tagToId.get(clazz);
    }
1240631
def getbyuuid(self, uuid):
        
        if uuid not in self._schbyuuid:
            raise KeyError('uuid {0} not registered'.format(uuid))

        return self._schbyuuid[uuid]
1096419
public T get(final UUID _uuid)
    {
        return getCache4UUID() == null ? null : getCache4UUID().get(_uuid);
    }