Retrieve a `Gebouw` by the Id.

        :param integer id: the Id of the `Gebouw`
        :rtype: :class:`Gebouw`
480361
def get_gebouw_by_id(self, id):
        '''
        
        '''
        def creator():
            res = crab_gateway_request(
                self.client, 'GetGebouwByIdentificatorGebouw', id
            )
            if res == None:
                raise GatewayResourceNotFoundException()
            return Gebouw(
                res.IdentificatorGebouw,
                res.AardGebouw,
                res.StatusGebouw,
                res.GeometriemethodeGebouw,
                res.Geometrie,
                Metadata(
                    res.BeginDatum,
                    res.BeginTijd,
                    self.get_bewerking(res.BeginBewerking),
                    self.get_organisatie(res.BeginOrganisatie)
                )
            )
        if self.caches['short'].is_configured:
            key = 'GetGebouwByIdentificatorGebouw#%s' % (id)
            gebouw = self.caches['short'].get_or_create(key, creator)
        else:
            gebouw = creator()
        gebouw.set_gateway(self)
        return gebouw
399493
def image_by_id(self, id):
        
        if not id:
            return None
        return next((image for image in self.images() if image['Id'] == id),
                    None)
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();
    }
100817
def get(cls, id):
        

        # cached?
        if CACHE:
            if id in _cache['Pool']:
                log.debug('cache hit for pool %d' % id)
                return _cache['Pool'][id]
            log.debug('cache miss for pool %d' % id)

        try:
            pool = Pool.list({'id': id})[0]
        except (IndexError, KeyError):
            raise NipapNonExistentError('no pool with ID ' + str(id) + ' found')

        _cache['Pool'][id] = pool
        return pool
841837
def _get_one(self, id):
        
        try:
            return self._to_dict(models.User.objects.get(pk=id))
        except models.User.DoesNotExist:
            raise errors.NotFound()
1174243
def get_by_id(id)
      accts = @accounts.select {|acct| acct.uuid == id }

      if accts.size == 0
        raise KeyError, "account with id #{id} unknown"
      elsif accts.size > 1
        logger.warn "multiple accounts with same UUID found", uuid: id
      end

      accts[0]
    end
838019
def find(self, id, **kwargs):
        
        return self.find_by(values={self.primary_key: id}, **kwargs)
1319543
def get_item_with_id(self, uid):
        
        for item in self.get_items():
            if item.id == uid:
                return item

        return None
832638
def get_int_id(self, str_id):
        """"""
        if not str_id in self.mapping:
            if self.curr_id == IdRemapper.INT_MAX:
                return None # No more 32 bits signed integers available
            self.mapping[str_id] = self.curr_id
            self.r_mapping[self.curr_id] = str_id
            self.curr_id += 1
        return self.mapping[str_id]
493555
def get_by_id(self, id):
        """"""
        with contextlib.closing(self.database.cursor()) as cursor:
            cursor.execute('SELECT id, name FROM users WHERE id=?', (id,))
            return cursor.fetchone()
496711
def get_group_by_id(self, group_id) -> typing.Optional['Group']:
        
        VALID_POSITIVE_INT.validate(group_id, 'get_group_by_id')
        for group in self.groups:

            if group.group_id == group_id:
                return group

        return None
572509
def get_pd_by_id(self, id):
        
        for pd in self.conn.protection_domains:
            if pd.id == id:
                return pd
        raise KeyError("Protection Domain with ID " + id + " not found")
1300430
def get(self, id):
        """"""
        params = {'q': 'id:%s' % str(id), 'wt': 'python'}
        request = urllib.parse.urlencode(params, doseq=True)
        data = None
        try:
            rsp = self.doPost(self.solrBase + '', request, self.formheaders)
            data = eval(rsp.read())
        except Exception:
            pass
        if data['response']['numFound'] > 0:
            return data['response']['docs'][0]
        return None
1364004
def get(self, id):
        
        with rconnect() as conn:
            if id is None:
                raise ValueError

            if isinstance(id, uuid.UUID):
                id = str(id)

            if type(id) != str and type(id) != unicode:
                raise ValueError

            try:
                query = self._base().get(id)
                log.debug(query)
                rv = query.run(conn)
            except ReqlOpFailedError as e:
                log.warn(e)
                raise
            except Exception as e:
                log.warn(e)
                raise
            if rv is not None:
                return self._model(rv)

            return None
955279
def get_sds_by_id(self,id):
        
        for sds in self.sds:
            if sds.id == id:
                return sds
        raise KeyError("SDS with that ID not found")
10039
def get(self, id, param):
        
        assert isinstance(id, basestring)
        assert isinstance(param, basestring)
        return self.params_.get(param, {}).get(id)
646607
def get(self, id):
        
        data = self.fetch('documents/%s.json' % id).get("document")
        data['_connection'] = self._connection
        return Document(data)