Returns an object that can be used to block a thread until a document
 with the given ID has been processed.

 Intended for testing.
504994
def waiter_for(id)
      @waiting[id] = true

      Waiter.new do
        loop do
          break true if !@waiting[id]
          sleep 0.1
        end
      end
    end
641816
def get_async_doc(id, opts = {})
      data, _status_code, _headers = get_async_doc_with_http_info(id, opts)
      return data
    end
22118
def get_record(cls, id_, with_deleted=False):
        
        with db.session.no_autoflush:
            query = RecordMetadata.query.filter_by(id=id_)
            if not with_deleted:
                query = query.filter(RecordMetadata.json != None)  # noqa
            obj = query.one()
            return cls(obj.json, model=obj)
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
339888
function (objectArray, id) {
                var i,
                    index = -1;
                for (i = 0; i < objectArray.length; i++) {
                    if (objectArray[i].id === id) {
                        index = i;
                        break;
                    }
                }

                return index;
            }
1078862
def open_doc(self, doc_id):
        '''
        '''
        d = defer.Deferred()
        self.increase_stat('open_doc')
        try:
            doc = self._get_doc(doc_id)
            doc = copy.deepcopy(doc)
            if doc.get('_deleted', None):
                raise NotFoundError('%s deleted' % doc_id)
            d.callback(Response(doc))
        except NotFoundError as e:
            d.errback(e)

        return d
1109752
def get_object(self, ObjectClass, id):
        
        try:
            object = ObjectClass.objects.get(id=id)
        except (ObjectClass.DoesNotExist, ObjectClass.MultipleObjectsReturned):
            object = None
        return object
226605
public boolean waitForFragmentById(int id){
		if(config.commandLogging){
			Log.d(config.commandLoggingTag, "waitForFragmentById("+id+")");
		}
		
		return waiter.waitForFragment(null, id, Timeout.getLargeTimeout());
	}
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();
    }
305205
def get(self, id):
        ''''''
        args = parser.parse_args()
        model = self.model.objects.only('id').get_or_404(id=id)
        qs = Follow.objects(following=model, until=None)
        return qs.paginate(args['page'], args['page_size'])
728702
def find_one_by_id(self, _id):
        
        document = (yield self.collection.find_one({"_id": ObjectId(_id)}))
        raise Return(self._obj_cursor_to_dictionary(document))
1010762
def get_by_id(cls, id):
        

        if any((isinstance(id, basestring) and id.isdigit(), isinstance(id,
               (int, float)))):
            return cls.query.get(int(id))
        return None
1028322
def delete(self, _id):
        
        mongo_response = yield self.collection.remove({"_id": ObjectId(_id)})

        raise Return(mongo_response)
1024677
def lock(self, id=str(uuid.uuid4()), ttl=DEFAULT_TIMEOUT):
        
        return Lock(id, ttl=ttl, client=self)
1149218
def _get_by_id_async(cls, id, parent=None, app=None, namespace=None,
                       **ctx_options):
    
    key = Key(cls._get_kind(), id, parent=parent, app=app, namespace=namespace)
    return key.get_async(**ctx_options)
757625
public static Method tryGetMethod(String id) {
    if (id.length() != NAME_LEN) {
      // we use it to fast discard the request without doing map lookup
      return null;
    }
    return idToMethod.get(id);
  }
1121948
function getElementById(id) {
		var el = null;
		try {
			el = doc.getElementById(id);
		}
		catch (e) {}
		return el;
	}