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

C# Engine.CascadingAction类代码示例

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

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



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

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


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


示例3: DoCascade

			public override bool DoCascade(CascadingAction action)
			{
				return action == CascadingAction.Delete || action == CascadingAction.SaveUpdate;
			}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:4,代码来源:CascadeStyle.cs


示例4: ReallyDoCascade

			public override bool ReallyDoCascade(CascadingAction action)
			{
				return action == CascadingAction.Delete;
			}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:4,代码来源:CascadeStyle.cs


示例5: Cascade

		public Cascade(CascadingAction action, CascadePoint point, IEventSource eventSource)
		{
			this.point = point;
			this.eventSource = eventSource;
			this.action = action;
		}
开发者ID:paulbatum,项目名称:nhibernate,代码行数:6,代码来源:Cascade.cs


示例6: CascadeCollection

		/// <summary>
		/// Cascade to the collection elements
		/// </summary>
		/// <param name="action"></param>
		/// <param name="style"></param>
		/// <param name="collectionType"></param>
		/// <param name="elemType"></param>
		/// <param name="child"></param>
		/// <param name="cascadeVia"></param>
		/// <param name="session"></param>
		/// <param name="anything"></param>
		private static void CascadeCollection(
			CascadingAction action,
			CascadeStyle style,
			CollectionType collectionType,
			IType elemType,
			object child,
			CascadePoint cascadeVia,
			ISessionImplementor session,
			object anything)
		{
			// cascade to current collection elements
			if (log.IsDebugEnabled)
			{
				log.Debug("cascading to collection: " + collectionType.Role);
			}
			ICollection iter = action.CascadableChildrenCollection(collectionType, child);
			foreach (object obj in iter)
			{
				Cascade(session, obj, elemType, action, style, cascadeVia, anything);
			}

			// handle oprhaned entities!!
			if (style.HasOrphanDelete && action.DeleteOrphans() && child is IPersistentCollection)
			{
				// We can do the cast since orphan-delete does not apply to:
				// 1. newly instatiated collections
				// 2. arrays ( we can't track orphans for detached arrays)
				System.Type entityName = collectionType.GetAssociatedClass(session.Factory);
				DeleteOrphans(entityName, child as IPersistentCollection, session);
			}
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:42,代码来源:Cascades.cs


示例7: Cascade

		/// <summary>
		/// Cascade an action from the parent object to all its children.
		/// </summary>
		/// <param name="session"></param>
		/// <param name="persister"></param>
		/// <param name="parent"></param>
		/// <param name="action"></param>
		/// <param name="cascadeTo"></param>
		/// <param name="anything"></param>
		public static void Cascade(ISessionImplementor session, IEntityPersister persister, object parent,
		                           CascadingAction action, CascadePoint cascadeTo, object anything)
		{
			if (persister.HasCascades)
			{
				if (log.IsDebugEnabled)
				{
					log.Debug("processing cascades for: " + persister.ClassName);
				}
				IType[] types = persister.PropertyTypes;
				CascadeStyle[] cascadeStyles = persister.PropertyCascadeStyles;
				for (int i = 0; i < types.Length; i++)
				{
					CascadeStyle style = cascadeStyles[i];
					if (style.DoCascade(action))
					{
						Cascade(session, persister.GetPropertyValue(parent, i), types[i], action, style, cascadeTo, anything);
					}
				}
				if (log.IsDebugEnabled)
				{
					log.Debug("done processing cascades for: " + persister.ClassName);
				}
			}
		}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:34,代码来源:Cascades.cs


示例8: DoCascade

				public override bool DoCascade(CascadingAction action)
				{
					return action == CascadingAction.ActionDelete;
				}
开发者ID:Novthirteen,项目名称:sconit_timesseiko,代码行数:4,代码来源:Cascades.cs


示例9: DoCascade

			public override bool DoCascade(CascadingAction action)
			{
				return action == CascadingAction.Merge || action == CascadingAction.SaveUpdateCopy;
			}
开发者ID:Ruhollah,项目名称:nhibernate-core,代码行数:4,代码来源:CascadeStyle.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Engine.EntityKey类代码示例发布时间:2022-05-26
下一篇:
C# DomainModel.Glarch类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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