• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IOuterJoinLoadable类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AbstractEntityJoinWalker

		public AbstractEntityJoinWalker(string rootSqlAlias, IOuterJoinLoadable persister, ISessionFactoryImplementor factory,
																		IDictionary<string, IFilter> enabledFilters)
			: base(factory, enabledFilters)
		{
			this.persister = persister;
			alias = rootSqlAlias;
		}
开发者ID:pallmall,项目名称:WCell,代码行数:7,代码来源:AbstractEntityJoinWalker.cs


示例2: AbstractEntityLoader

		public AbstractEntityLoader(IOuterJoinLoadable persister, IType uniqueKeyType, ISessionFactoryImplementor factory,
		                            IDictionary<string, IFilter> enabledFilters) : base(factory, enabledFilters)
		{
			this.uniqueKeyType = uniqueKeyType;
			entityName = persister.EntityName;
			this.persister = persister;
		}
开发者ID:paulbatum,项目名称:nhibernate,代码行数:7,代码来源:AbstractEntityLoader.cs


示例3: CriteriaJoinWalker

        public CriteriaJoinWalker(IOuterJoinLoadable persister,CriteriaQueryTranslator translator,
            ISessionFactoryImplementor factory, CriteriaImpl criteria, string rootEntityName,
            IDictionary<string, IFilter> enabledFilters)
            : base(translator.RootSQLAlias, persister, factory, enabledFilters)
        {
            this.translator = translator;

            querySpaces = translator.GetQuerySpaces();

            if (translator.HasProjection)
            {
                resultTypes = translator.ProjectedTypes;

                InitProjection(
                    translator.GetSelect(enabledFilters),
                    translator.GetWhereCondition(enabledFilters),
                    translator.GetOrderBy(),
                    translator.GetGroupBy().ToString(),
                    LockMode.None
                    );
            }
            else
            {
                resultTypes = new IType[] {TypeFactory.ManyToOne(persister.EntityName)};

                InitAll(translator.GetWhereCondition(enabledFilters), translator.GetOrderBy(), LockMode.None);
            }

            userAliasList.Add(criteria.Alias); //root entity comes *last*
            userAliases = ArrayHelper.ToStringArray(userAliasList);
        }
开发者ID:zibler,项目名称:zibler,代码行数:31,代码来源:CriteriaJoinWalker.cs


示例4: AbstractEntityJoinWalker

		public AbstractEntityJoinWalker(string alias, IOuterJoinLoadable persister, ISessionFactoryImplementor factory,
		                                IDictionary enabledFilters)
			: base(factory, enabledFilters)
		{
			this.persister = persister;
			this.alias = alias;
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:7,代码来源:AbstractEntityJoinWalker.cs


示例5: EntityLoader

		public EntityLoader(
			IOuterJoinLoadable persister,
			string[] uniqueKey,
			IType uniqueKeyType,
			int batchSize,
			LockMode lockMode,
			ISessionFactoryImplementor factory,
			IDictionary enabledFilters)
			: base(persister, uniqueKeyType, factory, enabledFilters)
		{
			JoinWalker walker = new EntityJoinWalker(
				persister,
				uniqueKey,
				uniqueKeyType,
				batchSize,
				lockMode,
				factory,
				enabledFilters
				);
			InitFromWalker(walker);

			PostInstantiate();

			batchLoader = batchSize > 1;

			log.Debug("Static select for entity " + entityName + ": " + SqlString);
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:27,代码来源:EntityLoader.cs


示例6: 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


示例7: InitStatementString

		private void InitStatementString(IOuterJoinLoadable elementPersister, string alias, int batchSize, SqlString subquery)
		{
			int joins = CountEntityPersisters(associations);
			Suffixes = BasicLoader.GenerateSuffixes(joins + 1);

			int collectionJoins = CountCollectionPersisters(associations) + 1;
			CollectionSuffixes = BasicLoader.GenerateSuffixes(joins + 1, collectionJoins);

			SqlStringBuilder whereString = WhereString(alias, oneToManyPersister.KeyColumnNames, subquery, batchSize);
			string filter = oneToManyPersister.FilterFragment(alias, EnabledFilters);
			whereString.Insert(0, StringHelper.MoveAndToBeginning(filter));

			JoinFragment ojf = MergeOuterJoins(associations);
			SqlSelectBuilder select =
				new SqlSelectBuilder(Factory).SetSelectClause(
					oneToManyPersister.SelectFragment(null, null, alias, Suffixes[joins], CollectionSuffixes[0], true)
					+ SelectString(associations)).SetFromClause(elementPersister.FromTableFragment(alias)
					                                            + elementPersister.FromJoinFragment(alias, true, true)).SetWhereClause(
					whereString.ToSqlString()).SetOuterJoins(ojf.ToFromFragmentString,
					                                         ojf.ToWhereFragmentString
					                                         + elementPersister.WhereJoinFragment(alias, true, true));

			select.SetOrderByClause(OrderBy(associations, oneToManyPersister.GetSQLOrderByString(alias)));

			if (Factory.Settings.IsCommentsEnabled)
			{
				select.SetComment("load one-to-many " + oneToManyPersister.Role);
			}

			SqlString = select.ToSqlString();
		}
开发者ID:Mrding,项目名称:Ribbon,代码行数:31,代码来源:OneToManyJoinWalker.cs


示例8: CriteriaLoader

		public CriteriaLoader(IOuterJoinLoadable persister, ISessionFactoryImplementor factory, CriteriaImpl rootCriteria,
							  string rootEntityName, IDictionary<string, IFilter> enabledFilters)
			: base(factory, enabledFilters)
		{
			translator = new CriteriaQueryTranslator(factory, rootCriteria, rootEntityName, CriteriaQueryTranslator.RootSqlAlias);

			querySpaces = translator.GetQuerySpaces();

			CriteriaJoinWalker walker =
				new CriteriaJoinWalker(persister, translator, factory, rootCriteria, rootEntityName, enabledFilters);

			InitFromWalker(walker);

			userAliases = walker.UserAliases;
			resultTypes = walker.ResultTypes;
			includeInResultRow = walker.IncludeInResultRow;
			resultRowLength = ArrayHelper.CountTrue(IncludeInResultRow);
			// fill caching objects only if there is a projection
			if (translator.HasProjection)
			{
				cachedProjectedColumnAliases = translator.ProjectedColumnAliases;
			}

			PostInstantiate();
		}
开发者ID:nhibernate,项目名称:nhibernate-core,代码行数:25,代码来源:CriteriaLoader.cs


示例9: CriteriaLoader

		public CriteriaLoader(
			IOuterJoinLoadable persister,
			ISessionFactoryImplementor factory,
			CriteriaImpl rootCriteria,
			System.Type rootEntityName, // TODO H3: change to string rootEntityName
			IDictionary enabledFilters)
			: base(factory, enabledFilters)
		{
			translator = new CriteriaQueryTranslator(
				factory,
				rootCriteria,
				rootEntityName,
				CriteriaQueryTranslator.RootSqlAlias);

			querySpaces = translator.GetQuerySpaces();

			CriteriaJoinWalker walker = new CriteriaJoinWalker(
				persister,
				translator,
				factory,
				rootCriteria,
				rootEntityName,
				enabledFilters);

			InitFromWalker(walker);

			userAliases = walker.UserAliases;
			resultTypes = walker.ResultTypes;

			PostInstantiate();
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:31,代码来源:CriteriaLoader.cs


示例10: 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


示例11: 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,
     IOuterJoinLoadable lhsPersister,
     IMapping mapping
     )
 {
     return GetLHSColumnNames(type, property, 0, lhsPersister, mapping);
 }
开发者ID:zibler,项目名称:zibler,代码行数:13,代码来源:JoinHelper.cs


示例12: WalkCompositeComponentIdTree

		private void WalkCompositeComponentIdTree(IOuterJoinLoadable persister, string alias, string path)
		{
			IType type = persister.IdentifierType;
			string propertyName = persister.IdentifierPropertyName;
			if (type != null && type.IsComponentType && !(type is EmbeddedComponentType))
			{
				ILhsAssociationTypeSqlInfo associationTypeSQLInfo = JoinHelper.GetIdLhsSqlInfo(alias, persister, Factory);
				WalkComponentTree((IAbstractComponentType)type, 0, alias, SubPath(path, propertyName), 0, associationTypeSQLInfo);
			}
		}
开发者ID:khaliyo,项目名称:Spring.net-NHibernate.net-Asp.net-MVC-DWZ-,代码行数:10,代码来源:CriteriaJoinWalker.cs


示例13: CascadeEntityLoader

        public CascadeEntityLoader(IOuterJoinLoadable persister, CascadingAction action, ISessionFactoryImplementor factory)
            : base(persister, persister.IdentifierType, factory, new CollectionHelper.EmptyMapClass<string, IFilter>())
        {
            JoinWalker walker = new CascadeEntityJoinWalker(persister, action, factory);
            InitFromWalker(walker);

            PostInstantiate();

            log.Debug(string.Format("Static select for action {0} on entity {1}: {2}", action, entityName, SqlString));
        }
开发者ID:zibler,项目名称:zibler,代码行数:10,代码来源:CascadeEntityLoader.cs


示例14: CriteriaLoader

		public CriteriaLoader( IOuterJoinLoadable persister, ISessionFactoryImplementor factory, CriteriaImpl criteria )
			: base( persister, factory )
		{
			this.criteria = criteria;

			AddAllToPropertySpaces( persister.PropertySpaces );

			resultTypes = new IType[ 1 ];
			resultTypes[ 0 ] = NHibernateUtil.Entity( persister.MappedClass );

			SqlStringBuilder condition = new SqlStringBuilder( 10 );

			bool foundCriterion = false;

			foreach( CriteriaImpl.CriterionEntry ee in criteria.IterateExpressionEntries() )
			{
				if( foundCriterion )
				{
					condition.Add( " and " );
				}

				SqlString sqlString = ee.Criterion.ToSqlString(
					factory,
					criteria.GetPersistentClass( ee.Alias ),
					ee.Alias,
					criteria.AliasClasses );
				condition.Add( sqlString );

				foundCriterion = true;
			}

			if( !foundCriterion )
			{
				condition.Add( "1=1" ); // TODO: fix this ugliness
			}

			StringBuilder orderBy = new StringBuilder( 30 );
			bool foundOrder = false;

			foreach( Order ord in criteria.IterateOrderings() )
			{
				if( foundOrder )
				{
					orderBy.Append( StringHelper.CommaSpace );
				}
				orderBy.Append( ord.ToSqlString( factory, criteria.CriteriaClass, Alias ) );
				foundOrder = true;
			}

			IList associations = WalkTree( persister, Alias, factory );
			InitClassPersisters( associations );
			InitStatementString( associations, condition.ToSqlString(), orderBy.ToString(), factory );

			PostInstantiate();
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:55,代码来源:CriteriaLoader.cs


示例15: CascadeEntityJoinWalker

		public CascadeEntityJoinWalker(IOuterJoinLoadable persister, CascadingAction action,
		                               ISessionFactoryImplementor factory)
			: base(persister, factory, new CollectionHelper.EmptyMapClass<string, IFilter>())
		{
			cascadeAction = action;
			SqlStringBuilder whereCondition = WhereString(Alias, persister.IdentifierColumnNames, 1)
				//include the discriminator and class-level where, but not filters
				.Add(persister.FilterFragment(Alias, new CollectionHelper.EmptyMapClass<string, IFilter>()));

			InitAll(whereCondition.ToSqlString(), SqlString.Empty, LockMode.Read);
		}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:11,代码来源:CascadeEntityJoinWalker.cs


示例16: EntityJoinWalker

		public EntityJoinWalker(IOuterJoinLoadable persister, string[] uniqueKey, int batchSize, LockMode lockMode,
		                        ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters)
			: base(persister, factory, enabledFilters)
		{
			this.lockMode = lockMode;

			SqlStringBuilder whereCondition = WhereString(Alias, uniqueKey, batchSize)
				//include the discriminator and class-level where, but not filters
				.Add(persister.FilterFragment(Alias, new CollectionHelper.EmptyMapClass<string, IFilter>()));

			InitAll(whereCondition.ToSqlString(), SqlString.Empty, lockMode);
		}
开发者ID:hoangduc007,项目名称:nhibernate-core,代码行数:12,代码来源:EntityJoinWalker.cs


示例17: EntityLoader

		public EntityLoader( IOuterJoinLoadable persister, string[] uniqueKey, IType uniqueKeyType, int batchSize, ISessionFactoryImplementor factory )
			: base( persister, factory )
		{
			this.uniqueKeyType = uniqueKeyType;

			IList associations = WalkTree( persister, Alias, factory );
			InitClassPersisters( associations );
			SqlString whereString = WhereString( factory, Alias, uniqueKey, uniqueKeyType, batchSize ).ToSqlString();
			RenderStatement( associations, whereString, factory );

			PostInstantiate();

			batchLoader = batchSize > 1;
		}
开发者ID:rcarrillopadron,项目名称:nhibernate-1.0.2.0,代码行数:14,代码来源:EntityLoader.cs


示例18: CollectionElementLoader

		public CollectionElementLoader(IQueryableCollection collectionPersister, ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters)
			: base(factory, enabledFilters)
		{
			keyType = collectionPersister.KeyType;
			indexType = collectionPersister.IndexType;
			persister = (IOuterJoinLoadable)collectionPersister.ElementPersister;
			entityName = persister.EntityName;

			JoinWalker walker = new EntityJoinWalker(persister, ArrayHelper.Join(collectionPersister.KeyColumnNames, collectionPersister.IndexColumnNames), 1, LockMode.None, factory, enabledFilters);
			InitFromWalker(walker);

			PostInstantiate();

			log.Debug("Static select for entity " + entityName + ": " + SqlString);
		}
开发者ID:pallmall,项目名称:WCell,代码行数:15,代码来源:CollectionElementLoader.cs


示例19: OneToManyJoinWalker

		public OneToManyJoinWalker(IQueryableCollection oneToManyPersister, int batchSize, SqlString subquery,
		                           ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters)
			: base(factory, enabledFilters)
		{
			this.oneToManyPersister = oneToManyPersister;
			elementPersister = (IOuterJoinLoadable)oneToManyPersister.ElementPersister;
			string alias = GenerateRootAlias(oneToManyPersister.Role);

			WalkEntityTree(elementPersister, alias);

			IList<OuterJoinableAssociation> allAssociations = new List<OuterJoinableAssociation>(associations);
			allAssociations.Add(
				new OuterJoinableAssociation(oneToManyPersister.CollectionType, null, null, alias, JoinType.LeftOuterJoin, null, Factory,
				                             new CollectionHelper.EmptyMapClass<string, IFilter>()));

			InitPersisters(allAssociations, LockMode.None);
			InitStatementString(elementPersister, alias, batchSize, subquery);
		}
开发者ID:KaraokeStu,项目名称:nhibernate-core,代码行数:18,代码来源:OneToManyJoinWalker.cs


示例20: CreateBatchingEntityLoader

		public static IUniqueEntityLoader CreateBatchingEntityLoader(IOuterJoinLoadable persister, int maxBatchSize,
																	 LockMode lockMode, ISessionFactoryImplementor factory,
																	 IDictionary<string, IFilter> enabledFilters)
		{
			if (maxBatchSize > 1)
			{
				int[] batchSizesToCreate = ArrayHelper.GetBatchSizes(maxBatchSize);
				Loader[] loadersToCreate = new Loader[batchSizesToCreate.Length];
				for (int i = 0; i < batchSizesToCreate.Length; i++)
				{
					loadersToCreate[i] = new EntityLoader(persister, batchSizesToCreate[i], lockMode, factory, enabledFilters);
				}
				return new BatchingEntityLoader(persister, batchSizesToCreate, loadersToCreate);
			}
			else
			{
				return new EntityLoader(persister, lockMode, factory, enabledFilters);
			}
		}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:19,代码来源:BatchingEntityLoader.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IOutput类代码示例发布时间:2022-05-24
下一篇:
C# IOrganizationService类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap