/// <summary> setups the sync logic for member _tjadwal</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncTjadwal(IEntity relatedEntity) { if(_tjadwal!=relatedEntity) { DesetupSyncTjadwal(true, true); _tjadwal = (TJadwalEntity)relatedEntity; base.PerformSetupSyncRelatedEntity( _tjadwal, new PropertyChangedEventHandler( OnTjadwalPropertyChanged ), "Tjadwal", THistoryJadwalEntity.Relations.TJadwalEntityUsingDEntry, false, ref _alreadyFetchedTjadwal, new string[] { } ); } }
/// <summary> Initializes the class members</summary> private void InitClassMembers() { _tjadwal = null; _tjadwalReturnsNewIfNotFound = true; _alwaysFetchTjadwal = false; _alreadyFetchedTjadwal = false; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
/// <summary> Removes the sync logic for member _tjadwal</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 DesetupSyncTjadwal(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity( _tjadwal, new PropertyChangedEventHandler( OnTjadwalPropertyChanged ), "Tjadwal", THistoryJadwalEntity.Relations.TJadwalEntityUsingDEntry, false, signalRelatedEntity, "ThistoryJadwal", false, new int[] { (int)THistoryJadwalFieldIndex.DEntry } ); _tjadwal = null; }
/// <summary> Retrieves the related entity of type 'TJadwalEntity', using a relation of type '1:1'</summary> /// <param name="forceFetch">if true, it will discard any changes currently in the currently loaded related entity and will refetch the entity from the persistent storage</param> /// <returns>A fetched entity of type 'TJadwalEntity' which is related to this entity.</returns> public virtual TJadwalEntity GetSingleTjadwal(bool forceFetch) { if( ( !_alreadyFetchedTjadwal || forceFetch || _alwaysFetchTjadwal) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode ) { TJadwalEntity newEntity = new TJadwalEntity(); IEntityRelation relation = THistoryJadwalEntity.Relations.TJadwalEntityUsingDEntry; if(base.ParticipatesInTransaction) { base.Transaction.Add(newEntity); } bool fetchResult = false; if(base.CheckIfLazyLoadingShouldOccur(relation)) { fetchResult = newEntity.FetchUsingPK(this.DEntry.GetValueOrDefault()); } if(!_tjadwalReturnsNewIfNotFound && !fetchResult) { this.Tjadwal = null; } else { if((base.ActiveContext!=null)&&fetchResult) { newEntity = (TJadwalEntity)base.ActiveContext.Get(newEntity); } this.Tjadwal = newEntity; _alreadyFetchedTjadwal = fetchResult; } if(base.ParticipatesInTransaction && !fetchResult) { base.Transaction.Remove(newEntity); } } return _tjadwal; }
/// <summary>Private CTor for deserialization</summary> /// <param name="info"></param> /// <param name="context"></param> protected THistoryJadwalEntity(SerializationInfo info, StreamingContext context) : base(info, context) { _tjadwal = (TJadwalEntity)info.GetValue("_tjadwal", typeof(TJadwalEntity)); if(_tjadwal!=null) { _tjadwal.AfterSave+=new EventHandler(OnEntityAfterSave); } _tjadwalReturnsNewIfNotFound = info.GetBoolean("_tjadwalReturnsNewIfNotFound"); _alwaysFetchTjadwal = info.GetBoolean("_alwaysFetchTjadwal"); _alreadyFetchedTjadwal = info.GetBoolean("_alreadyFetchedTjadwal"); base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance(), PersistenceInfoProviderSingleton.GetInstance()); // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary>Creates a new, empty TJadwalEntity object.</summary> /// <returns>A new, empty TJadwalEntity object.</returns> public override IEntity Create() { IEntity toReturn = new TJadwalEntity(); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewTJadwal // __LLBLGENPRO_USER_CODE_REGION_END return toReturn; }