public static ArtiklEntity FetchArtikl(DataAccessAdapterBase adapter, PrefetchPath2 prefetchPath, long ArtiklId)
		{
			ArtiklEntity _ArtiklEntity = new ArtiklEntity(ArtiklId);
			adapter.FetchEntity(_ArtiklEntity, prefetchPath);
			return _ArtiklEntity;
		}
		/// <summary> Removes the sync logic for member _artikl</summary>
		/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
		/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
		private void DesetupSyncArtikl(bool signalRelatedEntity, bool resetFKFields)
		{
			this.PerformDesetupSyncRelatedEntity( _artikl, new PropertyChangedEventHandler( OnArtiklPropertyChanged ), "Artikl", NinjaSoftware.Enio.CoolJ.RelationClasses.StaticRacunStavkaRelations.ArtiklEntityUsingArtiklIdStatic, true, signalRelatedEntity, "RacunStavkaCollection", resetFKFields, new int[] { (int)RacunStavkaFieldIndex.ArtiklId } );
			_artikl = null;
		}
		/// <summary> setups the sync logic for member _artikl</summary>
		/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
		private void SetupSyncArtikl(IEntityCore relatedEntity)
		{
			if(_artikl!=relatedEntity)
			{
				DesetupSyncArtikl(true, true);
				_artikl = (ArtiklEntity)relatedEntity;
				this.PerformSetupSyncRelatedEntity( _artikl, new PropertyChangedEventHandler( OnArtiklPropertyChanged ), "Artikl", NinjaSoftware.Enio.CoolJ.RelationClasses.StaticRacunStavkaRelations.ArtiklEntityUsingArtiklIdStatic, true, new string[] {  } );
			}
		}
		protected RacunStavkaEntity(SerializationInfo info, StreamingContext context) : base(info, context)
		{
			if(SerializationHelper.Optimization != SerializationOptimization.Fast) 
			{
				_artikl = (ArtiklEntity)info.GetValue("_artikl", typeof(ArtiklEntity));
				if(_artikl!=null)
				{
					_artikl.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				_racunGlava = (RacunGlavaEntity)info.GetValue("_racunGlava", typeof(RacunGlavaEntity));
				if(_racunGlava!=null)
				{
					_racunGlava.AfterSave+=new EventHandler(OnEntityAfterSave);
				}
				this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
			}
			// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
			// __LLBLGENPRO_USER_CODE_REGION_END
		}