Esempio n. 1
0
        public virtual ClassInfoIndex AddIndexOn(string
                                                 name, string[] indexFields, bool acceptMultipleValuesForSameKey)
        {
            if (indexes == null)
            {
                indexes = new NeoDatis.Tool.Wrappers.List.OdbArrayList <ClassInfoIndex
                                                                        >();
            }
            ClassInfoIndex cii = new ClassInfoIndex
                                     ();

            cii.SetClassInfoId(id);
            cii.SetCreationDate(NeoDatis.Tool.Wrappers.OdbTime.GetCurrentTimeInMs());
            cii.SetLastRebuild(cii.GetCreationDate());
            cii.SetName(name);
            cii.SetStatus(ClassInfoIndex.Enabled);
            cii.SetUnique(!acceptMultipleValuesForSameKey);
            int[] attributeIds = new int[indexFields.Length];
            for (int i = 0; i < indexFields.Length; i++)
            {
                attributeIds[i] = GetAttributeId(indexFields[i]);
            }
            cii.SetAttributeIds(attributeIds);
            indexes.Add(cii);
            return(cii);
        }
Esempio n. 2
0
 public virtual void SetAttributes(NeoDatis.Tool.Wrappers.List.IOdbList <ClassAttributeInfo
                                                                         > attributes)
 {
     this.attributes     = attributes;
     this.maxAttributeId = attributes.Count;
     FillAttributesMap();
 }
Esempio n. 3
0
 public virtual void AddHistory(object o)
 {
     if (history == null)
     {
         history = new NeoDatis.Tool.Wrappers.List.OdbArrayList <object>(1);
     }
     history.Add(o);
 }
Esempio n. 4
0
 public ClassInfo()
 {
     this.original = new CommittedCIZoneInfo(this
                                             , null, null, 0);
     this.committed = new CommittedCIZoneInfo(this
                                              , null, null, 0);
     this.uncommitted = new CIZoneInfo(this, null
                                       , null, 0);
     this.previousClassOID = null;
     this.nextClassOID     = null;
     this.blockSize        = -1;
     this.position         = -1;
     this.maxAttributeId   = -1;
     this.classCategory    = CategoryUserClass;
     this.history          = new NeoDatis.Tool.Wrappers.List.OdbArrayList <object>();
 }
Esempio n. 5
0
 protected ClassInfo(string fullClassName, string extraInfo, NeoDatis.Tool.Wrappers.List.IOdbList
                     <ClassAttributeInfo> attributes) : this()
 {
     this.fullClassName    = fullClassName;
     this.extraInfo        = extraInfo;
     this.attributes       = attributes;
     this.attributesByName = new NeoDatis.Tool.Wrappers.Map.OdbHashMap <string, ClassAttributeInfo
                                                                        >();
     this.attributesById = new NeoDatis.Tool.Wrappers.Map.OdbHashMap <int, ClassAttributeInfo
                                                                      >();
     if (attributes != null)
     {
         FillAttributesMap();
     }
     this.maxAttributeId = (attributes == null ? 1 : attributes.Count + 1);
 }
Esempio n. 6
0
		public ClassInfo()
		{
			this.original = new CommittedCIZoneInfo(this
				, null, null, 0);
			this.committed = new CommittedCIZoneInfo(this
				, null, null, 0);
			this.uncommitted = new CIZoneInfo(this, null
				, null, 0);
			this.previousClassOID = null;
			this.nextClassOID = null;
			this.blockSize = -1;
			this.position = -1;
			this.maxAttributeId = -1;
			this.classCategory = CategoryUserClass;
			this.history = new NeoDatis.Tool.Wrappers.List.OdbArrayList<object>();
		}
Esempio n. 7
0
		public virtual void AddHistory(object o)
		{
			if (history == null)
			{
				history = new NeoDatis.Tool.Wrappers.List.OdbArrayList<object>(1);
			}
			history.Add(o);
		}
Esempio n. 8
0
		public virtual void SetIndexes(NeoDatis.Tool.Wrappers.List.IOdbList<ClassInfoIndex
			> indexes2)
		{
			this.indexes = indexes2;
		}
Esempio n. 9
0
		public virtual ClassInfoIndex AddIndexOn(string
			 name, string[] indexFields, bool acceptMultipleValuesForSameKey)
		{
			if (indexes == null)
			{
				indexes = new NeoDatis.Tool.Wrappers.List.OdbArrayList<ClassInfoIndex
					>();
			}
			ClassInfoIndex cii = new ClassInfoIndex
				();
			cii.SetClassInfoId(id);
			cii.SetCreationDate(NeoDatis.Tool.Wrappers.OdbTime.GetCurrentTimeInMs());
			cii.SetLastRebuild(cii.GetCreationDate());
			cii.SetName(name);
			cii.SetStatus(ClassInfoIndex.Enabled);
			cii.SetUnique(!acceptMultipleValuesForSameKey);
			int[] attributeIds = new int[indexFields.Length];
			for (int i = 0; i < indexFields.Length; i++)
			{
				attributeIds[i] = GetAttributeId(indexFields[i]);
			}
			cii.SetAttributeIds(attributeIds);
			indexes.Add(cii);
			return cii;
		}
Esempio n. 10
0
		public virtual void SetAttributes(NeoDatis.Tool.Wrappers.List.IOdbList<ClassAttributeInfo
			> attributes)
		{
			this.attributes = attributes;
			this.maxAttributeId = attributes.Count;
			FillAttributesMap();
		}
Esempio n. 11
0
		protected ClassInfo(string fullClassName, string extraInfo, NeoDatis.Tool.Wrappers.List.IOdbList
			<ClassAttributeInfo> attributes) : this()
		{
			this.fullClassName = fullClassName;
			this.extraInfo = extraInfo;
			this.attributes = attributes;
			this.attributesByName = new NeoDatis.Tool.Wrappers.Map.OdbHashMap<string, ClassAttributeInfo
				>();
			this.attributesById = new NeoDatis.Tool.Wrappers.Map.OdbHashMap<int, ClassAttributeInfo
				>();
			if (attributes != null)
			{
				FillAttributesMap();
			}
			this.maxAttributeId = (attributes == null ? 1 : attributes.Count + 1);
		}
Esempio n. 12
0
 public virtual void SetIndexes(NeoDatis.Tool.Wrappers.List.IOdbList <ClassInfoIndex
                                                                      > indexes2)
 {
     this.indexes = indexes2;
 }