当前位置: 首页>>代码示例>>C#>>正文


C# NeoDatis.GetFullClassName方法代码示例

本文整理汇总了C#中NeoDatis.GetFullClassName方法的典型用法代码示例。如果您正苦于以下问题:C# NeoDatis.GetFullClassName方法的具体用法?C# NeoDatis.GetFullClassName怎么用?C# NeoDatis.GetFullClassName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NeoDatis的用法示例。


在下文中一共展示了NeoDatis.GetFullClassName方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddClass

		public virtual void AddClass(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo classInfo
			)
		{
			if (classInfo.IsSystemClass())
			{
				rapidAccessForSystemClassesByName.Add(classInfo.GetFullClassName(), classInfo);
			}
			else
			{
				rapidAccessForUserClassesByName.Add(classInfo.GetFullClassName(), classInfo);
			}
			rapidAccessForClassesByOid.Add(classInfo.GetId(), classInfo);
			allClassInfos.Add(classInfo);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:14,代码来源:MetaModel.cs

示例2: ClassInfoList

		public ClassInfoList(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo mainClassInfo
			)
		{
			this.classInfos = new NeoDatis.Tool.Wrappers.Map.OdbHashMap<string, NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
				>();
			this.classInfos[mainClassInfo.GetFullClassName()] = mainClassInfo;
			this.mainClassInfo = mainClassInfo;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:ClassInfoList.cs

示例3: NonNativeObjectInfo

		public NonNativeObjectInfo(object @object, NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
			 info, NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo[] values, long[] 
			attributesIdentification, int[] attributeIds) : base(NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
			.GetFromName(info.GetFullClassName()))
		{
			//new OdbArrayList<NonNativeObjectInfo>();
			[email protected] = @object;
			this.classInfo = info;
			this.attributeValues = values;
			this.maxNbattributes = classInfo.GetMaxAttributeId();
			if (attributeValues == null)
			{
				this.attributeValues = new NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo
					[maxNbattributes];
			}
			this.objectHeader = new NeoDatis.Odb.Core.Layers.Layer2.Meta.ObjectInfoHeader(-1, 
				null, null, (classInfo != null ? classInfo.GetId() : null), attributesIdentification
				, attributeIds);
			this.allNonNativeObjects = new NeoDatis.Tool.Wrappers.List.OdbArrayList<NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
				>();
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:21,代码来源:NonNativeObjectInfo.cs

示例4: GetFullClassName

		public static string GetFullClassName(NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery
			 query)
		{
			return query.GetFullClassName();
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:CriteriaQueryManager.cs

示例5: AddClassInfo

		public virtual void AddClassInfo(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo classInfo
			)
		{
			classInfos[classInfo.GetFullClassName()] = classInfo;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:5,代码来源:ClassInfoList.cs

示例6: SlowGetUserClassInfoIndex

		/// <summary>This method is only used by the odb explorer.</summary>
		/// <remarks>
		/// This method is only used by the odb explorer. So there is no too much
		/// problem with performance issue.
		/// </remarks>
		/// <param name="ci"></param>
		/// <returns>The index of the class info</returns>
		public virtual int SlowGetUserClassInfoIndex(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
			 ci)
		{
			System.Collections.IEnumerator iterator = rapidAccessForUserClassesByName.Values.
				GetEnumerator();
			int i = 0;
			NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo ci2 = null;
			while (iterator.MoveNext())
			{
				ci2 = (NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo)iterator.Current;
				if (ci2.GetId() == ci.GetId())
				{
					return i;
				}
				i++;
			}
			throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.ClassInfoDoesNotExistInMetaModel
				.AddParameter(ci.GetFullClassName()));
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:26,代码来源:MetaModel.cs

示例7: ValuesCriteriaQuery

		public ValuesCriteriaQuery(NeoDatis.Odb.Impl.Core.Query.Criteria.CriteriaQuery query
			) : this(query.GetFullClassName(), query.GetCriteria())
		{
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:4,代码来源:ValuesCriteriaQuery.cs

示例8: GetNativeObjectInfoInternal

		/// <summary>
		/// Build a meta representation of an object
		/// <pre>
		/// warning: When an object has two fields with the same name (a private field with the same name in a parent class, the deeper field (of the parent) is ignored!)
		/// </pre>
		/// </summary>
		/// <param name="o"></param>
		/// <param name="ci"></param>
		/// <param name="recursive"></param>
		/// <returns>The ObjectInfo</returns>
		protected virtual NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo GetObjectInfoInternal
			(NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo nnoi, object o, NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
			 ci, bool recursive, System.Collections.Generic.IDictionary<object, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
			> alreadyReadObjects, NeoDatis.Odb.Core.Layers.Layer1.Introspector.IIntrospectionCallback
			 callback)
		{
			object value = null;
			if (o == null)
			{
				return NeoDatis.Odb.Core.Layers.Layer2.Meta.NullNativeObjectInfo.GetInstance();
			}
			System.Type clazz = o.GetType();
			NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType type = NeoDatis.Odb.Core.Layers.Layer2.Meta.ODBType
				.GetFromClass(clazz);
			string className = OdbClassUtil.GetFullName(clazz);
			if (type.IsNative())
			{
				return GetNativeObjectInfoInternal(type, o, recursive, alreadyReadObjects, 
					callback);
			}
			// sometimes the clazz.getName() may not match the ci.getClassName()
			// It happens when the attribute is an interface or superclass of the
			// real attribute class
			// In this case, ci must be updated to the real class info
			if (ci != null && !clazz.FullName.Equals(ci.GetFullClassName()))
			{
				ci = GetClassInfo(className);
				nnoi = null;
			}
			NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo mainAoi = (NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
				)nnoi;
			bool isRootObject = false;
			if (alreadyReadObjects == null)
			{
				alreadyReadObjects = new NeoDatis.Tool.Wrappers.Map.OdbHashMap<object, NeoDatis.Odb.Core.Layers.Layer2.Meta.NonNativeObjectInfo
					>();
				isRootObject = true;
			}
			if (o != null)
			{
                NonNativeObjectInfo cachedNnoi = null;
                alreadyReadObjects.TryGetValue(o, out cachedNnoi);
				
                if (cachedNnoi != null)
				{
					ObjectReference or = new ObjectReference(cachedNnoi);
					return or;
				}
				if (callback != null)
				{
					callback.ObjectFound(o);
				}
			}
			if (mainAoi == null)
			{
				mainAoi = BuildNnoi(o, ci, null, null, null, alreadyReadObjects);
			}
			alreadyReadObjects[o] = mainAoi;
			NeoDatis.Tool.Wrappers.List.IOdbList<System.Reflection.FieldInfo> fields = classIntrospector.GetAllFields(className);
			NeoDatis.Odb.Core.Layers.Layer2.Meta.AbstractObjectInfo aoi = null;
			int attributeId = -1;
			// For all fields
			for (int i = 0; i < fields.Count; i++)
			{
				System.Reflection.FieldInfo field = fields[i];
				try
				{
					value = field.GetValue(o);
					attributeId = ci.GetAttributeId(field.Name);
					if (attributeId == -1)
					{
						throw new ODBRuntimeException(NeoDatisError.ObjectIntrospectorNoFieldWithName.AddParameter(ci.GetFullClassName()).AddParameter(field.Name));
					}
					ODBType valueType = null;
					if (value == null)
					{
						// If value is null, take the type from the field type
						// declared in the class
						valueType = ODBType.GetFromClass(field.FieldType);
					}
					else
					{
						// Else take the real attribute type!
						valueType = ODBType.GetFromClass(value.GetType());
					}
					// for native fields
					if (valueType.IsNative())
					{
						aoi = GetNativeObjectInfoInternal(valueType, value, recursive, alreadyReadObjects, callback);
						mainAoi.SetAttributeValue(attributeId, aoi);
//.........这里部分代码省略.........
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:101,代码来源:LocalObjectIntrospector.cs

示例9: WriteClassInfoHeader

		public virtual void WriteClassInfoHeader(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
			 classInfo, long position, bool writeInTransaction)
		{
			NeoDatis.Odb.OID classId = classInfo.GetId();
			if (classId == null)
			{
				classId = idManager.GetNextClassId(position);
				classInfo.SetId(classId);
			}
			else
			{
				idManager.UpdateClassPositionForId(classId, position, true);
			}
			fsi.SetWritePosition(position, writeInTransaction);
			if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId))
			{
				NeoDatis.Tool.DLogger.Debug(DepthToSpaces() + "Writing new Class info header at "
					 + position + " : " + classInfo.ToString());
			}
			// Real value of block size is only known at the end of the writing
			fsi.WriteInt(0, writeInTransaction, "block size");
			fsi.WriteByte(NeoDatis.Odb.Impl.Core.Layers.Layer3.Block.BlockTypes.BlockTypeClassHeader
				, writeInTransaction, "class header block type");
			fsi.WriteByte(classInfo.GetClassCategory(), writeInTransaction, "Class info category"
				);
			fsi.WriteLong(classId.GetObjectId(), writeInTransaction, "class id", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
				.DataWriteAction);
			WriteOid(classInfo.GetPreviousClassOID(), writeInTransaction, "prev class oid", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
				.DataWriteAction);
			WriteOid(classInfo.GetNextClassOID(), writeInTransaction, "next class oid", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
				.DataWriteAction);
			fsi.WriteLong(classInfo.GetCommitedZoneInfo().GetNbObjects(), writeInTransaction, 
				"class nb objects", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction
				);
			WriteOid(classInfo.GetCommitedZoneInfo().first, writeInTransaction, "class first obj pos"
				, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction);
			WriteOid(classInfo.GetCommitedZoneInfo().last, writeInTransaction, "class last obj pos"
				, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction);
			// FIXME : append extra info if not empty (.net compatibility)
			fsi.WriteString(classInfo.GetFullClassName(), false, writeInTransaction);
			fsi.WriteInt(classInfo.GetMaxAttributeId(), writeInTransaction, "Max attribute id"
				);
			if (classInfo.GetAttributesDefinitionPosition() != -1)
			{
				fsi.WriteLong(classInfo.GetAttributesDefinitionPosition(), writeInTransaction, "class att def pos"
					, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.DataWriteAction);
			}
			else
			{
				// @todo check this
				fsi.WriteLong(-1, writeInTransaction, "class att def pos", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
					.DataWriteAction);
			}
			int blockSize = (int)(fsi.GetPosition() - position);
			WriteBlockSizeAt(position, blockSize, writeInTransaction, classInfo);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:56,代码来源:AbstractObjectWriter.cs

示例10: AddClass

		public virtual NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo AddClass(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
			 newClassInfo, bool addDependentClasses)
		{
			NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo classInfo = GetSession().GetMetaModel
				().GetClassInfo(newClassInfo.GetFullClassName(), false);
			if (classInfo != null && classInfo.GetPosition() != -1)
			{
				return classInfo;
			}
			return PersistClass(newClassInfo, -1, true, addDependentClasses);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:11,代码来源:AbstractObjectWriter.cs

示例11: PersistClass

		/// <summary>Persist a single class info - This method is used by the XML Importer.</summary>
		/// <remarks>Persist a single class info - This method is used by the XML Importer.</remarks>
		public virtual NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo PersistClass(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
			 newClassInfo, int lastClassInfoIndex, bool addClass, bool addDependentClasses)
		{
			NeoDatis.Odb.Core.Layers.Layer2.Meta.MetaModel metaModel = GetSession().GetMetaModel
				();
			NeoDatis.Odb.OID classInfoId = newClassInfo.GetId();
			if (classInfoId == null)
			{
				classInfoId = GetIdManager().GetNextClassId(-1);
				newClassInfo.SetId(classInfoId);
			}
			long writePosition = fsi.GetAvailablePosition();
			newClassInfo.SetPosition(writePosition);
			GetIdManager().UpdateClassPositionForId(classInfoId, writePosition, true);
			if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId))
			{
				NeoDatis.Tool.DLogger.Debug("Persisting class into database : " + newClassInfo.GetFullClassName
					() + " with oid " + classInfoId + " at pos " + writePosition);
				NeoDatis.Tool.DLogger.Debug("class " + newClassInfo.GetFullClassName() + " has " 
					+ newClassInfo.GetNumberOfAttributes() + " attributes : " + newClassInfo.GetAttributes
					());
			}
			// The class info oid is created in ObjectWriter.writeClassInfoHeader
			if (metaModel.GetNumberOfClasses() > 0 && lastClassInfoIndex != -2)
			{
				NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo lastClassinfo = null;
				if (lastClassInfoIndex == -1)
				{
					lastClassinfo = metaModel.GetLastClassInfo();
				}
				else
				{
					lastClassinfo = metaModel.GetClassInfo(lastClassInfoIndex);
				}
				lastClassinfo.SetNextClassOID(newClassInfo.GetId());
				if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogId))
				{
					NeoDatis.Tool.DLogger.Debug("changing next class oid. of class info " + lastClassinfo
						.GetFullClassName() + " @ " + lastClassinfo.GetPosition() + " + offset " + NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.StorageEngineConstant
						.ClassOffsetNextClassPosition + " to " + newClassInfo.GetId() + "(" + newClassInfo
						.GetFullClassName() + ")");
				}
				fsi.SetWritePosition(lastClassinfo.GetPosition() + NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.StorageEngineConstant
					.ClassOffsetNextClassPosition, true);
				fsi.WriteLong(newClassInfo.GetId().GetObjectId(), true, "next class oid", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
					.PointerWriteAction);
				newClassInfo.SetPreviousClassOID(lastClassinfo.GetId());
			}
			if (addClass)
			{
				metaModel.AddClass(newClassInfo);
			}
			// updates number of classes
			WriteNumberOfClasses(metaModel.GetNumberOfClasses(), true);
			// If it is the first class , updates the first class OID
			if (newClassInfo.GetPreviousClassOID() == null)
			{
				WriteFirstClassInfoOID(newClassInfo.GetId(), true);
			}
			// Writes the header of the class - out of transaction (FIXME why out of
			// transaction)
			WriteClassInfoHeader(newClassInfo, writePosition, false);
			if (addDependentClasses)
			{
				NeoDatis.Tool.Wrappers.List.IOdbList<NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassAttributeInfo
					> dependingAttributes = newClassInfo.GetAllNonNativeAttributes();
				NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassAttributeInfo cai = null;
				for (int i = 0; i < dependingAttributes.Count; i++)
				{
					cai = dependingAttributes[i];
					try
					{
						NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo existingCI = metaModel.GetClassInfo
							(cai.GetFullClassname(), false);
						if (existingCI == null)
						{
							// TODO check if this getClassInfo is ok. Maybe, should
							// use
							// a buffered one
							AddClasses(classIntrospector.Introspect(cai.GetFullClassname(), true));
						}
						else
						{
							// Even,if it exist,take the one from metamodel
							cai.SetClassInfo(existingCI);
						}
					}
					catch (System.Exception e)
					{
						throw new NeoDatis.Odb.ODBRuntimeException(NeoDatis.Odb.Core.NeoDatisError.ClassIntrospectionError
							.AddParameter(cai.GetFullClassname()), e);
					}
				}
			}
			WriteClassInfoBody(newClassInfo, fsi.GetAvailablePosition(), true);
			return newClassInfo;
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:99,代码来源:AbstractObjectWriter.cs

示例12: UpdateInstanceFieldsOfClassInfo

		/// <summary>
		/// Updates the instance related field of the class info into the database
		/// file Updates the number of objects, the first object oid and the next
		/// class oid
		/// </summary>
		/// <param name="classInfo">The class info to be updated</param>
		/// <param name="writeInTransaction">To specify if it must be part of a transaction @
		/// 	</param>
		public virtual void UpdateInstanceFieldsOfClassInfo(NeoDatis.Odb.Core.Layers.Layer2.Meta.ClassInfo
			 classInfo, bool writeInTransaction)
		{
			long currentPosition = fsi.GetPosition();
			if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogIdDebug))
			{
				NeoDatis.Tool.DLogger.Debug(DepthToSpaces() + "Start of updateInstanceFieldsOfClassInfo for "
					 + classInfo.GetFullClassName());
			}
			long position = classInfo.GetPosition() + NeoDatis.Odb.Impl.Core.Layers.Layer3.Engine.StorageEngineConstant
				.ClassOffsetClassNbObjects;
			fsi.SetWritePosition(position, writeInTransaction);
			long nbObjects = classInfo.GetNumberOfObjects();
			fsi.WriteLong(nbObjects, writeInTransaction, "class info update nb objects", NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction
				.PointerWriteAction);
			WriteOid(classInfo.GetCommitedZoneInfo().first, writeInTransaction, "class info update first obj oid"
				, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.PointerWriteAction);
			WriteOid(classInfo.GetCommitedZoneInfo().last, writeInTransaction, "class info update last obj oid"
				, NeoDatis.Odb.Impl.Core.Transaction.DefaultWriteAction.PointerWriteAction);
			if (NeoDatis.Odb.OdbConfiguration.IsDebugEnabled(LogIdDebug))
			{
				NeoDatis.Tool.DLogger.Debug(DepthToSpaces() + "End of updateInstanceFieldsOfClassInfo for "
					 + classInfo.GetFullClassName());
			}
			fsi.SetWritePosition(currentPosition, writeInTransaction);
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:34,代码来源:AbstractObjectWriter.cs


注:本文中的NeoDatis.GetFullClassName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。