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


C# IOuterJoinLoadable类代码示例

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


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


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