public virtual int CompareTo(object o)
 {
     NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                                                                         )o;
     System.IComparable c2 = (System.IComparable)anoi.GetObject();
     System.IComparable c1 = (System.IComparable)theObject;
     return(c1.CompareTo(c2));
 }
Exemple #2
0
		/// <exception cref="System.Exception"></exception>
		public virtual void TestAtomicNativeCollectionDouble()
		{
			double d = 123456789.789456123;
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = null;
			anoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo(d, NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
				.DoubleId);
			string s = NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance
				().ToString(anoi);
			// println(s);
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi2 = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
				)NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance(
				).FromOneString(s);
			AssertEquals(anoi, anoi2);
		}
Exemple #3
0
		/// <exception cref="System.Exception"></exception>
		public virtual void TestAtomicNativeCollectionString()
		{
			string s1 = "ol√° chico";
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = null;
			anoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo(s1, NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
				.StringId);
			string s = NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance
				().ToString(anoi);
			// println(s);
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi2 = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
				)NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance(
				).FromOneString(s);
			AssertEquals(anoi, anoi2);
		}
Exemple #4
0
		/// <exception cref="System.Exception"></exception>
		public virtual void TestAtomicNativeCollectionBigDecimal()
		{
			System.Decimal bd = new System.Decimal("123456789.987654321");
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = null;
			anoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo(bd, NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
				.BigDecimalId);
			string s = NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance
				().ToString(anoi);
			// println(s);
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi2 = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
				)NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance(
				).FromOneString(s);
			AssertEquals(anoi, anoi2);
		}
Exemple #5
0
		/// <exception cref="System.Exception"></exception>
		public virtual void TestAtomicNativeCollectionDate()
		{
			System.DateTime date = new System.DateTime();
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = null;
			anoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo(date, NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
				.DateId);
			string s = NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance
				().ToString(anoi);
			// println(s);
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi2 = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
				)NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance(
				).FromOneString(s);
			AssertEquals(anoi, anoi2);
		}
 public virtual string ToString(object @object)
 {
     NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                                                                         )@object;
     System.Text.StringBuilder buffer = new System.Text.StringBuilder();
     // TODO escape ;
     buffer.Append(classId).Append(NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer
                                   .FieldSeparator);
     buffer.Append(anoi.GetOdbTypeId()).Append(NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer
                                               .FieldSeparator);
     buffer.Append(NeoDatis.Odb.Impl.Tool.ObjectTool.AtomicNativeObjectToString(anoi,
                                                                                NeoDatis.Odb.Impl.Tool.ObjectTool.IdCallerIsSerializer));
     return(buffer.ToString());
 }
 public override bool Equals(object obj)
 {
     if (obj == null || !(obj is NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                          ))
     {
         return(false);
     }
     NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo noi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                                                                        )obj;
     if (theObject == noi.GetObject())
     {
         return(true);
     }
     return(theObject.Equals(noi.GetObject()));
 }
Exemple #8
0
        public virtual void TestAtomicNativeCollectionBigDecimal()
        {
            System.Decimal bd = new System.Decimal("123456789.987654321");
            NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = null;
            anoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo(bd, NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
                                                                                   .BigDecimalId);
            string s = NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance
                           ().ToString(anoi);

            // println(s);
            NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi2 = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                                                                                 )NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance(
                ).FromOneString(s);
            AssertEquals(anoi, anoi2);
        }
Exemple #9
0
        public virtual void TestAtomicNativeCollectionDate()
        {
            System.DateTime date = new System.DateTime();
            NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = null;
            anoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo(date, NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
                                                                                   .DateId);
            string s = NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance
                           ().ToString(anoi);

            // println(s);
            NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi2 = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                                                                                 )NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance(
                ).FromOneString(s);
            AssertEquals(anoi, anoi2);
        }
Exemple #10
0
        public virtual void TestAtomicNativeCollectionDouble()
        {
            double d = 123456789.789456123;

            NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = null;
            anoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo(d, NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
                                                                                   .DoubleId);
            string s = NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance
                           ().ToString(anoi);

            // println(s);
            NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi2 = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                                                                                 )NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance(
                ).FromOneString(s);
            AssertEquals(anoi, anoi2);
        }
Exemple #11
0
        public virtual void TestAtomicNativeCollectionString()
        {
            string s1 = "ol√° chico";

            NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi = null;
            anoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo(s1, NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
                                                                                   .StringId);
            string s = NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance
                           ().ToString(anoi);

            // println(s);
            NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo anoi2 = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                                                                                 )NeoDatis.Odb.Impl.Core.Layers.Layer2.Meta.Serialization.Serializer.GetInstance(
                ).FromOneString(s);
            AssertEquals(anoi, anoi2);
        }
Exemple #12
0
 public static string AtomicNativeObjectToString(NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                                                 anoi, int caller)
 {
     if (anoi == null || anoi.IsNull())
     {
         return("null");
     }
     if (anoi.GetObject() is System.DateTime)
     {
         if (NeoDatis.Odb.Impl.Tool.ObjectTool.CallerIsOdbExplorer(caller))
         {
             return(format.Format((System.DateTime)anoi.GetObject()));
         }
         return(((System.DateTime)anoi.GetObject()).Millisecond.ToString());
     }
     return(anoi.GetObject().ToString());
 }
Exemple #13
0
        public override NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo CreateCopy
            (System.Collections.Generic.IDictionary <NeoDatis.Odb.OID, NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo
                                                     > cache, bool onlyData)
        {
            object[] array  = GetArray();
            int      length = array.Length;

            NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo[] aois = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
                                                                             [length];
            for (int i = 0; i < length; i++)
            {
                NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo aoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo
                                                                               )array[i];
                aois[i] = aoi.CreateCopy(cache, onlyData);
            }
            NeoDatis.Odb.Core.Layers.Layer2.Meta.ArrayObjectInfo arrayOfAoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.ArrayObjectInfo
                                                                                  (aois);
            arrayOfAoi.SetRealArrayComponentClassName(realArrayComponentClassName);
            arrayOfAoi.SetComponentTypeId(componentTypeId);
            return(arrayOfAoi);
        }
		public override NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo CreateCopy
			(System.Collections.Generic.IDictionary<NeoDatis.Odb.OID, NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo
			> cache, bool onlyData)
		{
			object[] array = GetArray();
			int length = array.Length;
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo[] aois = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AtomicNativeObjectInfo
				[length];
			for (int i = 0; i < length; i++)
			{
				NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo aoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo
					)array[i];
				aois[i] = aoi.CreateCopy(cache, onlyData);
			}
			NeoDatis.Odb.Core.Layers.Layer2.Meta.ArrayObjectInfo arrayOfAoi = new NeoDatis.Odb.Core.Layers.Layer2.Meta.ArrayObjectInfo
				(aois);
			arrayOfAoi.SetRealArrayComponentClassName(realArrayComponentClassName);
			arrayOfAoi.SetComponentTypeId(componentTypeId);
			return arrayOfAoi;
		}