Ejemplo 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);
        }
Ejemplo n.º 2
0
 public virtual void SetAttributes(NeoDatis.Tool.Wrappers.List.IOdbList <ClassAttributeInfo
                                                                         > attributes)
 {
     this.attributes     = attributes;
     this.maxAttributeId = attributes.Count;
     FillAttributesMap();
 }
Ejemplo n.º 3
0
 public virtual void AddHistory(object o)
 {
     if (history == null)
     {
         history = new NeoDatis.Tool.Wrappers.List.OdbArrayList <object>(1);
     }
     history.Add(o);
 }
Ejemplo 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>();
 }
Ejemplo 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);
 }
Ejemplo 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>();
		}
Ejemplo n.º 7
0
		public virtual void AddHistory(object o)
		{
			if (history == null)
			{
				history = new NeoDatis.Tool.Wrappers.List.OdbArrayList<object>(1);
			}
			history.Add(o);
		}
Ejemplo n.º 8
0
		public virtual void SetIndexes(NeoDatis.Tool.Wrappers.List.IOdbList<ClassInfoIndex
			> indexes2)
		{
			this.indexes = indexes2;
		}
Ejemplo 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;
		}
Ejemplo n.º 10
0
		public virtual void SetAttributes(NeoDatis.Tool.Wrappers.List.IOdbList<ClassAttributeInfo
			> attributes)
		{
			this.attributes = attributes;
			this.maxAttributeId = attributes.Count;
			FillAttributesMap();
		}
Ejemplo 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);
		}
Ejemplo n.º 12
0
 public virtual void SetIndexes(NeoDatis.Tool.Wrappers.List.IOdbList <ClassInfoIndex
                                                                      > indexes2)
 {
     this.indexes = indexes2;
 }