Returns object id or ``None``.
772133
def get_id(self):
        
        import warnings
        warnings.warn('{0}.get_id() is deprecated, '
                      'use {0}.id instead'.format(type(self).__name__),
                      DeprecationWarning)
        return self.get('_id')
544520
def int_id(self):
        ""
        id_or_name = self.id_or_name
        if id_or_name is not None and isinstance(id_or_name, int):
            return id_or_name
        return None
389603
def _get_persistent_id(self, o):
        
        if type(o) in self.hash_dedup:
            oid = o.__class__.__name__ + "-" + str(hash(o))
            self._object_cache[oid] = o
            return oid

        if any(isinstance(o,c) for c in self.unsafe_key_baseclasses):
            return None

        try:
            return self._uuid_cache[o]
        except KeyError:
            pass
        except TypeError:
            return None

        #if type(o) in self.uuid_dedup:
        #    return self._get_id(o)
        if o.__class__.__module__.split('.')[0] in self.module_dedup or o.__class__ in self.uuid_dedup:
            oid = o.__class__.__name__.split(".")[-1] + '-' + str(uuid.uuid4())
            self._object_cache[oid] = o
            self._uuid_cache[o] = oid
            return oid

        return None
529210
def get_object_id(self, datum):
        """"""

        # Role assignment doesn't have identifier so one will be created
        # from the identifier of scope, user and role. This will guaranty the
        # unicity.
        scope_id = ""
        if "project" in datum.scope:
            scope_id = datum.scope["project"]["id"]
        elif "domain" in datum.scope:
            scope_id = datum.scope["domain"]["id"]

        assignee_id = ""
        if hasattr(datum, "user"):
            assignee_id = datum.user["id"]
        elif hasattr(datum, "group"):
            assignee_id = datum.group["id"]

        return "%s%s%s" % (assignee_id, datum.role["id"], scope_id)
274853
def get_id(self):
        
        if self._id is None:
            # FIXME: provide a better error message when key is not defined
            self._id = self.inspect(refresh=False)["Id"]
        return self._id
765054
def individual(self, ind_id=None):
        
        for ind_obj in self.individuals:
            if ind_obj.ind_id == ind_id:
                return ind_obj
        return None
860703
def get_object(self, ObjectClass, id):
        
        print('dynamo.get(%s, %s)' % (ObjectClass, str(id)))
        resp = self.db.engine.get(ObjectClass, [id])
        if resp:
            return resp[0]
        else:
            return None
221239
def persistent_id(self, obj):
        """"""
        if isinstance(obj, Element):
            # Here, our persistent ID is simply a tuple, containing a tag and
            # a key
            return obj.__class__.__name__, obj.symbol
        else:
            # If obj does not have a persistent ID, return None. This means obj
            # needs to be pickled as usual.
            return None
602604
def get_obj(ref):
    """"""
    oid = int(ref)
    return server.id2ref.get(oid) or server.id2obj[oid]
1323710
def get_id(self):
        
        if self.type == 'NAF':
            return self.node.get('id')
        elif self.type == 'KAF':
            return self.node.get('mid')
1029519
def _id_or_key(list_item):
    '''
    
    '''
    if isinstance(list_item, dict):
        if 'id' in list_item:
            return list_item['id']
        if 'key' in list_item:
            return list_item['key']
    return list_item
541093
function nonEnum(obj) {

  Object.getOwnPropertyNames(obj).forEach(k => {
    Object.defineProperty(obj, k, { enumerable: false });
  });

  return obj;
}
728526
def get_object(self, id, **args):
        """"""
        return self.request("{0}/{1}".format(self.version, id), args)
613030
def persistent_id(self, obj):
        
        if getattr(obj, '_PERSIST_REFERENCES', None):
            objid = id(obj)
            obj._persistent_ref = objid
            _weakmemos[objid] = obj
        return None
722837
def _get_oid(data, position, dummy0, dummy1, dummy2):
    """"""
    end = position + 12
    return ObjectId(data[position:end]), end
1170693
def get_instance_id(self, instance):
        "  "
        if type(instance) in [list, tuple]:
            core_signals.request_finished.connect(receiver=RichTextField.reset_instance_counter_listener)
            if RichTextField.__inst_counter >= len(instance):
                return None
            else:
                obj_id = self.instance[ RichTextField.__inst_counter ].pk
            RichTextField.__inst_counter += 1
        else:
            obj_id = instance.pk
        return obj_id
586889
def get_id(brain_or_object):
    
    if is_brain(brain_or_object) and base_hasattr(brain_or_object, "getId"):
        return brain_or_object.getId
    return get_object(brain_or_object).getId()