private long AssociateIdToObject(byte idType, byte idStatus, long objectPosition)
        {
            long idPosition = objectWriter.AssociateIdToObject(idType, idStatus, currentBlockIdPosition
                                                               , nextId, objectPosition, false);

            nextId = provider.GetObjectOID(nextId.GetObjectId() + 1, 0);
            return(idPosition);
        }
 /// <param name="objectWriter">The object writer</param>
 /// <param name="objectReader">The object reader</param>
 /// <param name="currentBlockIdPosition">The position of the current block</param>
 /// <param name="currentBlockIdNumber">The number of the current block</param>
 /// <param name="currentMaxId">Maximum Database id</param>
 public DefaultIdManager(NeoDatis.Odb.Core.Layers.Layer3.IObjectWriter objectWriter
                         , NeoDatis.Odb.Core.Layers.Layer3.IObjectReader objectReader, long currentBlockIdPosition
                         , int currentBlockIdNumber, NeoDatis.Odb.OID currentMaxId)
 {
     this.provider               = NeoDatis.Odb.OdbConfiguration.GetCoreProvider();
     this.objectWriter           = objectWriter;
     this.objectReader           = objectReader;
     this.session                = objectWriter.GetSession();
     this.currentBlockIdPosition = currentBlockIdPosition;
     this.currentBlockIdNumber   = currentBlockIdNumber;
     this.maxId = provider.GetObjectOID((long)currentBlockIdNumber * NeoDatis.Odb.OdbConfiguration
                                        .GetNB_IDS_PER_BLOCK(), 0);
     this.nextId = provider.GetObjectOID(currentMaxId.GetObjectId() + 1, 0);
     lastIds     = new NeoDatis.Odb.OID[IdBufferSize];
     for (int i = 0; i < IdBufferSize; i++)
     {
         lastIds[i] = NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.StorageEngineConstant.NullObjectId;
     }
     lastIdPositions = new long[IdBufferSize];
     lastIdIndex     = 0;
 }
		/// <param name="objectWriter">The object writer</param>
		/// <param name="objectReader">The object reader</param>
		/// <param name="currentBlockIdPosition">The position of the current block</param>
		/// <param name="currentBlockIdNumber">The number of the current block</param>
		/// <param name="currentMaxId">Maximum Database id</param>
		public DefaultIdManager(NeoDatis.Odb.Core.Layers.Layer3.IObjectWriter objectWriter
			, NeoDatis.Odb.Core.Layers.Layer3.IObjectReader objectReader, long currentBlockIdPosition
			, int currentBlockIdNumber, NeoDatis.Odb.OID currentMaxId)
		{
			this.provider = NeoDatis.Odb.OdbConfiguration.GetCoreProvider();
			this.objectWriter = objectWriter;
			this.objectReader = objectReader;
			this.session = objectWriter.GetSession();
			this.currentBlockIdPosition = currentBlockIdPosition;
			this.currentBlockIdNumber = currentBlockIdNumber;
			this.maxId = provider.GetObjectOID((long)currentBlockIdNumber * NeoDatis.Odb.OdbConfiguration
				.GetNB_IDS_PER_BLOCK(), 0);
			this.nextId = provider.GetObjectOID(currentMaxId.GetObjectId() + 1, 0);
			lastIds = new NeoDatis.Odb.OID[IdBufferSize];
			for (int i = 0; i < IdBufferSize; i++)
			{
				lastIds[i] = NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.StorageEngineConstant.NullObjectId;
			}
			lastIdPositions = new long[IdBufferSize];
			lastIdIndex = 0;
		}