Reference¶
Interfaces¶
Interfaces for the unique id utility.
-
interface
zope.intid.interfaces.IIntIdsManage[source]¶ Some methods used by the view.
-
__len__()¶ Return the number of objects indexed.
-
items()¶ Return a list of (id, object) pairs.
-
-
interface
zope.intid.interfaces.IIntIds[source]¶ Extends:
zope.intid.interfaces.IIntIdsSet,zope.intid.interfaces.IIntIdsQuery,zope.intid.interfaces.IIntIdsManageA utility that assigns unique ids to objects.
Allows to query object by id and id by object.
-
interface
zope.intid.interfaces.IIntIdEvent[source]¶ Generic base interface for IntId-related events
-
object¶ The object related to this event
-
original_event¶ The ObjectEvent related to this event
-
-
interface
zope.intid.interfaces.IIntIdRemovedEvent[source]¶ Extends:
zope.intid.interfaces.IIntIdEventA unique id will be removed
The event is published before the unique id is removed from the utility so that the indexing objects can unindex the object.
-
class
zope.intid.interfaces.IntIdRemovedEvent(object, event)[source]¶ Bases:
objectThe event which is published before the unique id is removed from the utility so that the catalogs can unindex the object.
-
interface
zope.intid.interfaces.IIntIdAddedEvent[source]¶ Extends:
zope.intid.interfaces.IIntIdEventA unique id has been added
The event gets sent when an object is registered in a unique id utility.
-
idmap¶ The dictionary that holds an (utility -> id) mapping of created ids
-
Implementation¶
Unique id utility.
This utility assigns unique integer ids to objects and allows lookups by object and by id.
This functionality can be used in cataloging.
-
class
zope.intid.IntIds(family=None)[source]¶ Bases:
persistent.PersistentThis utility provides a two way mapping between objects and integer ids.
IKeyReferences to objects are stored in the indexes.
-
zope.intid.removeIntIdSubscriber(ob, event)[source]¶ A subscriber to ObjectRemovedEvent
Removes the unique ids registered for the object in all the unique id utilities.