Returns the object that is identified by an id.

@param id
The id of the object that should be returned.
@return The object if one is registered by this id.
@throws ObjectToIdMappingException
When no object with the given id is registered.
428122
public Object getByIdOrFail(final UUID id) throws ObjectToIdMappingException {
        Optional<Object> object = getById(id);
        if (!object.isPresent()) {
            throw new ObjectToIdMappingException(format(
                    "An object with the id [%s] was expected to be known but it was not.  %s", id.toString(),
                    SYNCRONISM_LOST));
        }
        return object.get();
    }
142515
public RegisteredServiceDocument get(final long id) {
        try {
            return this.get(String.valueOf(id));
        } catch (final DocumentNotFoundException e) {
            LOGGER.debug("Service [{}] not found. [{}]", id, e.getMessage());
            return null;
        }
    }
387626
public E getById(String id) {
        if (id == null) {
            for (E element : this) {
                if (element != null && element.getId() == null) {
                    return element;
                }
            }
        } else {
            for (E element : this) {
                if (element != null && id.equals(element.getId())) {
                    return element;
                }
            }
        }
        return null;
    }
690582
public int getInternalId(String id) {
		DatabaseEntry key = new DatabaseEntry();
		StringBinding.stringToEntry(id, key);
		DatabaseEntry data = new DatabaseEntry();
		// check if the id already exists in id to iid database
		if ((idToIidDB.get(null, key, data, null) == OperationStatus.SUCCESS)) {
			return IntegerBinding.entryToInt(data);
		} else {
			return -1;
		}
	}
769565
private <T> Class<? extends T> getObjectFromClassMap(String id, Map<String, Object> classMap)
    {
        Object obj = classMap.get(id);
        
        if(obj == null)
        {
            return null;    //object for this id wasn't found on the map
        }
        
        if(obj instanceof Class<?>)
        {
            return (Class<? extends T>)obj;
        }
        else if (obj instanceof String )
        {
            Class<?> clazz = ClassUtils.simpleClassForName((String)obj);
            classMap.put(id, clazz);
            return (Class<? extends T>)clazz;
        }
        
        //object stored in the map for this id is an invalid type.  remove it and return null
        classMap.remove(id);
        return null;        
    }
466745
public static Object getId(Object object) {
		Objects.nonNull(object);
		try {
			Field idField = getIdField(object.getClass());
			if (idField == null) throw new IllegalArgumentException(object.getClass().getName() + " has no id field to get");
			Object id = idField.get(object);
			return id;
		} catch (SecurityException | IllegalAccessException e) {
			throw new LoggingRuntimeException(e, logger, "getting Id failed");
		}
	}
710928
public <T extends MPBase> T getById(String id) throws MPException {
        T resource = null;
        for (int i = 0; i < _resourceArray.size(); i++) {
            resource = getByIndex(i);
            try {
                Field field = resource.getClass().getDeclaredField("id");
                field.setAccessible(true);
                String resourceId = field.get(resource).toString();
                if (resourceId.equals(id)) {
                    break;
                }
            } catch (Exception exception) {
                throw new MPException(exception);
            }
        }
        return resource;
    }
753377
def _ensure_object_id(cls, id):
        """"""
        if isinstance(id, ObjectId):
            return id

        if isinstance(id, basestring) and OBJECTIDEXPR.match(id):
            return ObjectId(id)

        return id
209681
public static String getName(ObjectIdentifier oid) {
        OIDInfo info = oidMap.get(oid);
        return (info == null) ? null : info.name;
    }
711948
public <T> T getObjectById(Class<T> clazz, Object id) {
        return pm.getObjectById(clazz, id);
    }
564260
public Cat get(Integer id) {
        if (DB.isEmpty()) {
            addExampleCats();
        }

        return DB.get(id);
    }
101907
@CheckForNull
    public Descriptor<T> findByName(String id) {
        for (Descriptor<T> d : this)
            if(d.getId().equals(id))
                return d;
        return null;
    }
1222766
public static String objectId(Object object) {
        if (object == null) {
            return "?";
        }
        if (object instanceof IdInfoProvider) {
            return getId(((IdInfoProvider) object).idScope(),
                ((IdInfoProvider) object).idObject());
        } else {
            return getId(object.getClass(), object);
        }
    }
1246461
protected void createMapping(String id) {
		DatabaseEntry key = new DatabaseEntry();
		DatabaseEntry data = new DatabaseEntry();
		IntegerBinding.intToEntry(loadCounter, key);
		StringBinding.stringToEntry(id, data);
		iidToIdDB.put(null, key, data); // required during name look-up
		idToIidDB.put(null, data, key); // required during indexing
	}
1152718
public ObjectIdSerializer<?> getObjectId( Object object ) {
        if ( null != mapObjectId ) {
            return mapObjectId.get( object );
        }
        return null;
    }
734346
public Point getPoint(String id) {
        for (Point point : points)
            if (id.equals(point.getId()))
                return point;
        return null;
    }
128331
@Override
	public Optional<T> findById(final ID id) {
		return arangoOperations.find(id, domainClass);
	}