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


C# IAssociationType类代码示例

本文整理汇总了C#中IAssociationType的典型用法代码示例。如果您正苦于以下问题:C# IAssociationType类的具体用法?C# IAssociationType怎么用?C# IAssociationType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: AssociationContainedInEnumerable

 public AssociationContainedInEnumerable(AllorsExtentFilteredSql extent, IAssociationType association, IEnumerable<IObject> enumerable)
 {
     extent.CheckAssociation(association);
     PredicateAssertions.AssertAssociationContainedIn(association, this.enumerable);
     this.association = association;
     this.enumerable = enumerable;
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:AssociationContainedInEnumerable.cs

示例2: AssociationExists

        internal AssociationExists(ExtentFiltered extent, IAssociationType associationType)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.ValidateAssociationExists(associationType);

            this.associationType = associationType;
        }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:AssociationExists.cs

示例3: GetJoinType

		protected override JoinType GetJoinType(IAssociationType type, FetchMode config, string path,
			string lhsTable, string[] lhsColumns, bool nullable, int currentDepth, CascadeStyle cascadeStyle)
		{
			if (translator.IsJoin(path))
			{
				return translator.GetJoinType(path);
			}
			else
			{
				if (translator.HasProjection)
				{
					return JoinType.None;
				}
				else
				{
					FetchMode fetchMode = translator.RootCriteria.GetFetchMode(path);
					if (IsDefaultFetchMode(fetchMode))
					{
						return base.GetJoinType(type, config, path, lhsTable, lhsColumns, nullable, currentDepth, cascadeStyle);
					}
					else
					{
						if (fetchMode == FetchMode.Join)
						{
							IsDuplicateAssociation(lhsTable, lhsColumns, type); //deliberately ignore return value!
							return GetJoinType(nullable, currentDepth);
						}
						else
						{
							return JoinType.None;
						}
					}
				}
			}
		}
开发者ID:pallmall,项目名称:WCell,代码行数:35,代码来源:CriteriaJoinWalker.cs

示例4: GetAliasedLHSColumnNames

 /// <summary>
 /// Get the aliased columns of the owning entity which are to 
 /// be used in the join
 /// </summary>
 public static string[] GetAliasedLHSColumnNames(
     IAssociationType type,
     string alias,
     int property,
     int begin,
     IOuterJoinLoadable lhsPersister,
     IMapping mapping
     )
 {
     if (type.UseLHSPrimaryKey)
     {
         return StringHelper.Qualify(alias, lhsPersister.IdentifierColumnNames);
     }
     else
     {
         string propertyName = type.LHSPropertyName;
         if (propertyName == null)
         {
             return ArrayHelper.Slice(
                 lhsPersister.ToColumns(alias, property),
                 begin,
                 type.GetColumnSpan(mapping)
                 );
         }
         else
         {
             return ((IPropertyMapping) lhsPersister).ToColumns(alias, propertyName); //bad cast
         }
     }
 }
开发者ID:zibler,项目名称:zibler,代码行数:34,代码来源:JoinHelper.cs

示例5: AssociationContainedInExtent

 internal AssociationContainedInExtent(ExtentFiltered extent, IAssociationType association, Allors.Extent inExtent)
 {
     extent.CheckAssociation(association);
     PredicateAssertions.AssertAssociationContainedIn(association, inExtent);
     this.association = association;
     this.inExtent = ((Extent)inExtent).ContainedInExtent;
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:AssociationContainedInExtent.cs

示例6: IsJoinedFetchEnabled

		/// <summary>
		/// Disable outer join fetching if this loader obtains an
		/// upgrade lock mode
		/// </summary>
		protected override bool IsJoinedFetchEnabled(IAssociationType type, FetchMode config,
		                                             Cascades.CascadeStyle cascadeStyle)
		{
			return lockMode.GreaterThan(LockMode.Read) ?
			       false :
			       base.IsJoinedFetchEnabled(type, config, cascadeStyle);
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:11,代码来源:EntityJoinWalker.cs

示例7: AllorsPredicateAssociationInExtentSql

 internal AllorsPredicateAssociationInExtentSql(AllorsExtentFilteredSql extent, IAssociationType association, Extent inExtent)
 {
     extent.CheckAssociation(association);
     PredicateAssertions.AssertAssociationContainedIn(association, inExtent);
     this.association = association;
     this.inExtent = (AllorsExtentSql) inExtent;
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:AssociationContainedInExtent.cs

示例8: CheckForAssociationType

 internal void CheckForAssociationType(IAssociationType association)
 {
     if (!this.objectType.ExistAssociationType(association))
     {
         throw new ArgumentException("Extent does not have association " + association);
     }
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:ExtentFiltered.cs

示例9: GetLHSColumnNames

		/// <summary>
		/// Get the columns of the owning entity which are to 
		/// be used in the join
		/// </summary>
		public static string[] GetLHSColumnNames(
			IAssociationType type,
			int property,
			int begin,
			IOuterJoinLoadable lhsPersister,
			IMapping mapping
			)
		{
			if (type.UseLHSPrimaryKey)
			{
				//return lhsPersister.getSubclassPropertyColumnNames(property);
				return lhsPersister.IdentifierColumnNames;
			}
			else
			{
				string propertyName = type.LHSPropertyName;
				if (propertyName == null)
				{
					//slice, to get the columns for this component
					//property
					return ArrayHelper.Slice(
						lhsPersister.GetSubclassPropertyColumnNames(property),
						begin,
						type.GetColumnSpan(mapping)
						);
				}
				else
				{
					//property-refs for associations defined on a
					//component are not supported, so no need to slice
					return lhsPersister.GetPropertyColumnNames(propertyName);
				}
			}
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:38,代码来源:JoinHelper.cs

示例10: AllorsPredicateAssociationContainsSql

 internal AllorsPredicateAssociationContainsSql(AllorsExtentFilteredSql extent, IAssociationType association, IObject allorsObject)
 {
     extent.CheckAssociation(association);
     PredicateAssertions.AssertAssociationContains(association, allorsObject);
     this.association = association;
     this.allorsObject = allorsObject;
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:AssociationContains.cs

示例11: GetJoinType

		protected virtual JoinType GetJoinType( IAssociationType type, OuterJoinFetchStrategy config, string path, string table, string[] foreignKeyColumns, ISessionFactoryImplementor factory )
		{
			bool mappingDefault = IsJoinedFetchEnabledByDefault( config, type, factory );
			return IsJoinedFetchEnabled( type, mappingDefault, path, table, foreignKeyColumns) ?
				JoinType.LeftOuterJoin :
				JoinType.None;
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:7,代码来源:OuterJoinLoader.cs

示例12: AllorsPredicateAssociationInstanceofSql

 internal AllorsPredicateAssociationInstanceofSql(AllorsExtentFilteredSql extent, IAssociationType association, IObjectType instanceType, IClass[] instanceClasses)
 {
     extent.CheckAssociation(association);
     PredicateAssertions.ValidateAssociationInstanceof(association, instanceType);
     this.association = association;
     this.instanceClasses = instanceClasses;
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:AssociationInstanceOf.cs

示例13: AssociationEquals

 internal AssociationEquals(ExtentFiltered extent, IAssociationType association, IObject allorsObject)
 {
     extent.CheckAssociation(association);
     PredicateAssertions.AssertAssociationEquals(association, allorsObject);
     this.association = association;
     this.allorsObject = allorsObject;
 }
开发者ID:whesius,项目名称:allors,代码行数:7,代码来源:AssociationEquals.cs

示例14: AssociationContains

        internal AssociationContains(ExtentFiltered extent, IAssociationType associationType, IObject containedObject)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationContains(associationType, containedObject);

            this.associationType = associationType;
            this.containedObject = containedObject;
        }
开发者ID:whesius,项目名称:allors,代码行数:8,代码来源:AssociationContains.cs

示例15: AssociationContainedInEnumerable

        internal AssociationContainedInEnumerable(ExtentFiltered extent, IAssociationType associationType, IEnumerable<IObject> containingEnumerable)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationContainedIn(associationType, containingEnumerable);

            this.associationType = associationType;
            this.containingEnumerable = containingEnumerable;
        }
开发者ID:whesius,项目名称:allors,代码行数:8,代码来源:AssociationContainedInEnumerable.cs


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