Ejemplo n.º 1
0
		/// <exception cref="System.Exception"></exception>
		public virtual void Conc(IExtObjectContainer oc)
		{
			IObjectSet os = oc.Query(typeof(InvalidUUIDTestCase));
			if (os.Count == 0)
			{
				// already deleted by other threads
				return;
			}
			Assert.AreEqual(1, os.Count);
			InvalidUUIDTestCase iu = (InvalidUUIDTestCase)os.Next();
			Db4oUUID myUuid = oc.GetObjectInfo(iu).GetUUID();
			Assert.IsNotNull(myUuid);
			byte[] mySignature = myUuid.GetSignaturePart();
			long myLong = myUuid.GetLongPart();
			long unknownLong = long.MaxValue - 100;
			byte[] unknownSignature = new byte[] { 1, 2, 4, 99, 33, 22 };
			Db4oUUID unknownLongPart = new Db4oUUID(unknownLong, mySignature);
			Db4oUUID unknownSignaturePart = new Db4oUUID(myLong, unknownSignature);
			Db4oUUID unknownBoth = new Db4oUUID(unknownLong, unknownSignature);
			Assert.IsNull(oc.GetByUUID(unknownLongPart));
			Assert.IsNull(oc.GetByUUID(unknownSignaturePart));
			Assert.IsNull(oc.GetByUUID(unknownBoth));
			Assert.IsNull(oc.GetByUUID(unknownLongPart));
			Thread.Sleep(500);
			oc.Delete(iu);
			oc.Commit();
			Assert.IsNull(oc.GetByUUID(myUuid));
		}
Ejemplo n.º 2
0
		/// <exception cref="System.Exception"></exception>
		protected override void Store()
		{
			object value = CreateItem();
			_clazz = value.GetType();
			Store(value);
			id = Db().Ext().GetID(value);
			uuid = Db().Ext().GetObjectInfo(value).GetUUID();
		}
Ejemplo n.º 3
0
		/// <exception cref="System.Exception"></exception>
		protected override void Db4oSetupAfterStore()
		{
			object customer = ((Customer)RetrieveOnlyInstance(typeof(Customer)));
			object country = ((Country)RetrieveOnlyInstance(typeof(Country)));
			customerID = Db().GetID(customer);
			countryID = Db().GetID(country);
			customerUUID = Db().GetObjectInfo(customer).GetUUID();
			countryUUID = Db().GetObjectInfo(country).GetUUID();
			Reopen();
		}
Ejemplo n.º 4
0
 public override sealed object GetByUUID(Db4oUUID uuid)
 {
     return GetByUUID(null, uuid);
 }
Ejemplo n.º 5
0
 /// <exception cref="System.Exception"></exception>
 protected override void Store()
 {
     var linkedArrays = LinkedArrays.NewLinkedArrayRoot(TestedDepth);
     Store(linkedArrays);
     _linkedArraysUUID = Db().GetObjectInfo(linkedArrays).GetUUID();
 }
Ejemplo n.º 6
0
		public abstract object GetByUUID(Db4oUUID arg1);
Ejemplo n.º 7
0
		public object GetByUUID(Transaction trans, Db4oUUID uuid)
		{
			lock (_lock)
			{
				if (uuid == null)
				{
					return null;
				}
				HardObjectReference hardRef = GetHardReferenceBySignature(CheckTransaction(trans)
					, uuid.GetLongPart(), uuid.GetSignaturePart());
				return hardRef._object;
			}
		}
Ejemplo n.º 8
0
			public _IEventListener4_34(Db4oUUID itemUUID)
			{
				this.itemUUID = itemUUID;
			}
Ejemplo n.º 9
0
 /// <exception cref="System.Exception"></exception>
 protected override void Store()
 {
     var item = new Item();
     Store(item);
     _uuid = Db().GetObjectInfo(item).GetUUID();
 }
Ejemplo n.º 10
0
 public _ICodeBlock_122(Db4oIOExceptionTestCase _enclosing, Db4oUUID uuid)
 {
     this._enclosing = _enclosing;
     this.uuid = uuid;
 }
Ejemplo n.º 11
0
		/// <exception cref="Db4objects.Db4o.Ext.DatabaseClosedException"></exception>
		/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
		public virtual object GetByUUID(Db4oUUID uuid)
		{
			throw new NotImplementedException();
		}
		/// <exception cref="Db4objects.Db4o.Ext.DatabaseClosedException"></exception>
		/// <exception cref="Db4objects.Db4o.Ext.Db4oIOException"></exception>
		public virtual object GetByUUID(Db4oUUID uuid)
		{
			lock (Lock())
			{
				CheckClosed();
				return _server.GetByUUID(_transaction, uuid);
			}
		}
Ejemplo n.º 13
0
		/// <exception cref="System.Exception"></exception>
		protected override void Store()
		{
			DeleteUUIDTestCase.Item item = new DeleteUUIDTestCase.Item();
			Store(item);
			_uuid = Db().GetObjectInfo(item).GetUUID();
		}
Ejemplo n.º 14
0
		public DrsUUIDImpl(Db4oUUID db4oUUID) : this(db4oUUID.GetSignaturePart(), db4oUUID
			.GetLongPart())
		{
		}