OID stands for Object ID.

In ODB, every entity have an OID.

Entity: a Class or an Object.

An OID uniquely identifies an entity in the ODB Database.

ODB has special blocks to keep associations between the OID and the physical position of the entity in the database file. The OID allows a direct access (ODB.getObjectFromId(OID id)) to the object with a reduced number of IO operations.

All pointers in the database use OIDs. When an object has a relation with another, the relation is stored using the OID object.


If a user has an attribute profile (with OID 15), the user object will be stored as having a relation with the OID 15.


The OID is implemented by org.neodatis.odb.core.OID interface. Default implementation is org.neodatis.odb.core.oid.OdbOID.

Here the OID interface

public interface OID extends Comparable , Serializable{
    public static final int TYPE_CLASS_OID = 1;
    public static final int TYPE_OBJECT_OID = 2;
    public static final int TYPE_NATIVE_OID = 3;
    public long getClassId();
    public long getObjectId();
    public int getType();

OIDs are managed by the org.neodatis.odb.core.io.IdManager class.

In the current release, OID does not use the ClassInfoId, it only use the object id which is unique in the database and stored as a long.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License