Retrieve a `gemeente` by the crab id.

        :param integer id: The CRAB id of the gemeente.
        :rtype: :class:`Gemeente`
554737
def get_gemeente_by_id(self, id):
        '''
        
        '''
        def creator():
            res = crab_gateway_request(
                self.client, 'GetGemeenteByGemeenteId', id
            )
            if res == None:
                 raise GatewayResourceNotFoundException()
            return Gemeente(
                res.GemeenteId,
                res.GemeenteNaam,
                res.NisGemeenteCode,
                Gewest(res.GewestId),
                res.TaalCode,
                (res.CenterX, res.CenterY),
                (res.MinimumX, res.MinimumY, res.MaximumX, res.MaximumY),
                Metadata(
                    res.BeginDatum,
                    res.BeginTijd,
                    self.get_bewerking(res.BeginBewerking),
                    self.get_organisatie(res.BeginOrganisatie)
                )
            )
        if self.caches['long'].is_configured:
            key = 'GetGemeenteByGemeenteId#%s' % id
            gemeente = self.caches['long'].get_or_create(key, creator)
        else:
            gemeente = creator()
        gemeente.set_gateway(self)
        return gemeente
428390
def get_straat_by_id(self, id):
        '''
        
        '''
        def creator():
            res = crab_gateway_request(
                self.client, 'GetStraatnaamWithStatusByStraatnaamId', id
            )
            if res == None:
                 raise GatewayResourceNotFoundException()
            return Straat(
                res.StraatnaamId,
                res.StraatnaamLabel,
                res.GemeenteId,
                res.StatusStraatnaam,
                res.Straatnaam,
                res.TaalCode,
                res.StraatnaamTweedeTaal,
                res.TaalCodeTweedeTaal,
                Metadata(
                    res.BeginDatum,
                    res.BeginTijd,
                    self.get_bewerking(res.BeginBewerking),
                    self.get_organisatie(res.BeginOrganisatie)
                )
            )

        if self.caches['long'].is_configured:
            key = 'GetStraatnaamWithStatusByStraatnaamId#%s' % (id)
            straat = self.caches['long'].get_or_create(key, creator)
        else:
            straat = creator()
        straat.set_gateway(self)
        return straat
1323806
def get_unit_by_id(self, unit_id: str) -> typing.Optional['BaseUnit']:
        
        VALID_POSITIVE_INT.validate(unit_id, 'get_unit_by_id')
        for unit in self.units:

            if unit.unit_id == unit_id:
                return unit
        return None
236844
def retrieve_by_id(self, id_):
        """"""
        items_with_id = [item for item in self if item.id == int(id_)]
        if len(items_with_id) == 1:
            return items_with_id[0].retrieve()
976635
def get(cls, id):
        

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

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

        _cache['Prefix'][id] = prefix
        return prefix
747537
def get_plaintext(self, id): # pylint: disable=invalid-name,redefined-builtin
        
        return self.service.get_id(self.base, id, params={'format': 'text'}).text
521203
def get_index_by_id(self, id):
        """"""
        for i in range(len(self.vertices)):
            if self.vertices[i].id == id:
                return i
        raise ValueError('Reverse look up of id failed.')
834679
def id
      id_attr = resource[:id]
      return id_attr.to_s if id_attr.present? && id_attr.is_a?(::Valkyrie::ID) && !id_attr.blank?
      return "" unless resource.respond_to?(:alternate_ids)
      resource.alternate_ids.first.to_s
    end
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'])
840071
def _get_id(self, rdata):
        
        if 'id' in rdata:
            if isinstance(rdata['id'], basestring) or \
                    isinstance(rdata['id'], int) or \
                    isinstance(rdata['id'], long) or \
                    isinstance(rdata['id'], float) or \
                    rdata['id'] is None:
                return rdata['id']
            else:
                # invalid type
                raise InvalidRequestError
        else:
            # It's a notification.
            return None
1178798
def scrubID(ID):
    

    try:
        if type(ID) == list:
            return int(ID[0])
        elif type(ID) == str:
            return int(ID)
        elif type(ID) == int:
            return ID
        elif type(ID) == unicode:
            return int(ID)

    except ValueError:
        return None
926000
def getById(self, Id):
        
        # we need to create a new object to insure we don't corrupt the generator count
        csvsource = CSVSource(self.source, self.factory, self.key())
        try:
            for item in csvsource.items():
                if Id == item.getId():
                    return item
        except StopIteration:
            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]
1051359
def get(cls, id):
        '''  '''

        if not id:
            return None

        redis = cls.get_redis()
        key = '{}:{}:obj'.format(cls.cls_key(), id)

        if not redis.exists(key):
            return None

        obj = cls(id=id)
        obj._persisted = True

        data = debyte_hash(redis.hgetall(key))

        for fieldname, field in obj.proxy:
            value = field.recover(data, redis)

            setattr(
                obj,
                fieldname,
                value
            )

        return obj
860217
def id(self, id):
        

        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")
        if len(id) > 255:
            raise ValueError("Invalid value for `id`, length must be less than `255`")

        self._id = id
309605
public static Interface get(nitro_service service, String id) throws Exception{
		Interface obj = new Interface();
		obj.set_id(id);
		Interface response = (Interface) obj.get_resource(service);
		return response;
	}
933907
def get(self, id):
        
        for obj in self.model.db:
            if obj["id"] == id:
                return self._cast_model(obj)

        return None