internal static DiagnosticService CreateDiagnosticService(int numReqProcs)
 {
     // create a bunch of dummy procedure types (without procedure plans)
     HashedSet<ProcedureType> procedureTypes = new HashedSet<ProcedureType>();
     for (int p = 0; p < numReqProcs; p++)
     {
         ProcedureType pt = new ProcedureType("20" + p, "Procedure 20" + p);
         procedureTypes.Add(pt);
     }
     return new DiagnosticService("301", "Diagnostic Service 301", procedureTypes);
 }
		public static ISet CreateFilterKeys(IDictionary<string, IFilter> enabledFilters, EntityMode entityMode)
		{
			if (enabledFilters.Count == 0)
				return null;
			Set result = new HashedSet();
			foreach (FilterImpl filter in enabledFilters.Values)
			{
				FilterKey key = new FilterKey(filter.Name, filter.Parameters, filter.FilterDefinition.ParameterTypes, entityMode);
				result.Add(key);
			}
			return result;
		}
        protected KokOzelDurumu.Uretici uretici(KokOzelDurumTipi tip, HarfDizisiIslemi islem) 
        {

            // bir adet kok ozel durumu uretici olustur.
            KokOzelDurumu.Uretici uretici = new KokOzelDurumu.Uretici(tip, islem);

            // eger varsa kok adlarini kullanarak iliskili ekleri bul ve bir Set'e ata.
            String[] ekAdlari = tip.EkAdlari;
            if (ekAdlari.Length > 0) {
                Set<Ek> set = new HashedSet<Ek>();
                foreach (String s in ekAdlari) {
                    Ek ek = ekYonetici.ek(s);
                    if (ek != null) {
                        set.Add(ek);
                    } else {
                        logger.Warn(s + " eki bulunamadigindan kok ozel durumuna eklenemedi!");
                    }
                }
                // ureticiye seti ata.
                uretici.gelebilecekEkler(set);
            }
            return uretici;
        }
Beispiel #4
0
        public virtual void Composite_Key_Mapping_Works_For_CategorizedItems()
        {
            InitData();

            // Query for Category and all categorized Items (three tables joined)
            NHibernateHelper.BeginTransaction();
            ISession s = NHibernateHelper.Session;

            IQuery q = s.CreateQuery("select c from Category as c left join fetch c.CategorizedItems as ci join fetch ci.Item as i");
            System.Collections.ICollection result = new HashedSet(q.List());
            Assert.IsTrue(result.Count == 2);

            NHibernateHelper.CommitTransaction();
            NHibernateHelper.CloseSession();

            // Check initialization (should be eager fetched)
            foreach(Category cat in result)
            {
                foreach(CategorizedItem catItem in cat.CategorizedItems)
                {
                    Assert.IsTrue(catItem != null);
                }
            }
        }
Beispiel #5
0
 public Badge()
 {
     users = new HashedSet<Soul>();
 }
Beispiel #6
0
		public A()
		{
			Items = new HashedSet();
		}
		/// <summary> 
		/// We encountered a delete request on a transient instance.
		/// <p/>
		/// This is a deviation from historical Hibernate (pre-3.2) behavior to
		/// align with the JPA spec, which states that transient entities can be
		/// passed to remove operation in which case cascades still need to be
		/// performed.
		///  </summary>
		/// <param name="session">The session which is the source of the event </param>
		/// <param name="entity">The entity being delete processed </param>
		/// <param name="cascadeDeleteEnabled">Is cascading of deletes enabled</param>
		/// <param name="persister">The entity persister </param>
		/// <param name="transientEntities">
		/// A cache of already visited transient entities (to avoid infinite recursion).
		/// </param>
		protected virtual void DeleteTransientEntity(IEventSource session, object entity, bool cascadeDeleteEnabled, IEntityPersister persister, ISet transientEntities)
		{
			log.Info("handling transient entity in delete processing");
			// NH different impl : NH-1895
			if(transientEntities == null)
			{
				transientEntities = new HashedSet();
			}
			if (!transientEntities.Add(entity))
			{
				log.Debug("already handled transient entity; skipping");
				return;
			}
			CascadeBeforeDelete(session, persister, entity, null, transientEntities);
			CascadeAfterDelete(session, persister, entity, transientEntities);
		}
        List<DolazakNaTrening> findNeplaceniDolasci(List<DolazakNaTrening> dolasci, DateTime from, DateTime to,
            List<UplataClanarine> uplate)
        {
            ISet uplateSet = new HashedSet();
            foreach (UplataClanarine u in uplate)
            {
                if (u.VaziOd.Value >= from && u.VaziOd.Value <= to)
                {
                    uplateSet.Add(new ClanGodinaMesec(u.Clan.Id, u.VaziOd.Value.Year, u.VaziOd.Value.Month));
                }
            }

            List<DolazakNaTrening> result = new List<DolazakNaTrening>();
            foreach (DolazakNaTrening d in dolasci)
            {
                if (!uplateSet.Contains(new ClanGodinaMesec(d.Clan.Id, d.DatumDolaska.Value.Year, d.DatumDolaska.Value.Month)))
                {
                    result.Add(d);
                }
            }
            return result;
        }
 public Artist()
 {
     Albums = new HashedSet();
 }
Beispiel #10
0
 public Soul()
 {
     badges = new HashedSet<Badge>();
 }
 public Album()
 {
     Tracks = new HashedSet();
 }
		public SimpleAuxiliaryDatabaseObject(String sqlCreateString, String sqlDropString, HashedSet dialectScopes)
			: base(dialectScopes)
		{
			this.sqlCreateString = sqlCreateString;
			this.sqlDropString = sqlDropString;
		}
Beispiel #13
0
 public UserProfileComments()
 {
     List = new HashedSet<Comment>();
 }
Beispiel #14
0
 public User()
 {
     UserProfileComments = new UserProfileComments();
     Friends = new HashedSet<User>();
     Inviters = new HashedSet<User>();
     Likes = new HashedSet<Like>();
     Dislikes = new HashedSet<Dislike>();
     Groups = new HashedSet<Group>();
 }
Beispiel #15
0
 public Message()
 {
     MessageStatusForUsers = new HashedSet<MessageStatus>();
 }
Beispiel #16
0
 public virtual ShiftGroup SetDefaultProperty()
 {
     AssignmentTypes = new HashedSet<AssignmentType>();
     WorkingDayMask = new MaskOfDay();
     return this;
 }