/// <summary> Retrieves the related entity of type 'MHakAksesEntity', using a relation of type 'n: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 'MHakAksesEntity' which is related to this entity.</returns> public virtual MHakAksesEntity GetSingleMhakAkses(bool forceFetch) { if( ( !_alreadyFetchedMhakAkses || forceFetch || _alwaysFetchMhakAkses) && !base.IsSerializing && !base.IsDeserializing && !base.InDesignMode) { bool performLazyLoading = base.CheckIfLazyLoadingShouldOccur(MUserEntity.Relations.MHakAksesEntityUsingCIdHakAkses); MHakAksesEntity newEntity = new MHakAksesEntity(); if(base.ParticipatesInTransaction) { base.Transaction.Add(newEntity); } bool fetchResult = false; if(performLazyLoading) { fetchResult = newEntity.FetchUsingPK(this.CIdHakAkses); } if(fetchResult) { if(base.ActiveContext!=null) { newEntity = (MHakAksesEntity)base.ActiveContext.Get(newEntity); } this.MhakAkses = newEntity; } else { if(_mhakAksesReturnsNewIfNotFound) { if(performLazyLoading || (!performLazyLoading && (_mhakAkses == null))) { this.MhakAkses = newEntity; } } else { this.MhakAkses = null; } } _alreadyFetchedMhakAkses = fetchResult; if(base.ParticipatesInTransaction && !fetchResult) { base.Transaction.Remove(newEntity); } } return _mhakAkses; }
/// <summary> setups the sync logic for member _mhakAkses</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncMhakAkses(IEntity relatedEntity) { if(_mhakAkses!=relatedEntity) { DesetupSyncMhakAkses(true, true); _mhakAkses = (MHakAksesEntity)relatedEntity; base.PerformSetupSyncRelatedEntity( _mhakAkses, new PropertyChangedEventHandler( OnMhakAksesPropertyChanged ), "MhakAkses", MUserEntity.Relations.MHakAksesEntityUsingCIdHakAkses, true, ref _alreadyFetchedMhakAkses, new string[] { } ); } }
/// <summary> Initializes the class members</summary> private void InitClassMembers() { _malat = new Kalibrasi.Data.CollectionClasses.MAlatCollection(new MAlatEntityFactory()); _malat.SetContainingEntityInfo(this, "Muser"); _alwaysFetchMalat = false; _alreadyFetchedMalat = false; _mdepartement = new Kalibrasi.Data.CollectionClasses.MDepartementCollection(new MDepartementEntityFactory()); _mdepartement.SetContainingEntityInfo(this, "Muser"); _alwaysFetchMdepartement = false; _alreadyFetchedMdepartement = false; _mlokasi = new Kalibrasi.Data.CollectionClasses.MLokasiCollection(new MLokasiEntityFactory()); _mlokasi.SetContainingEntityInfo(this, "Muser"); _alwaysFetchMlokasi = false; _alreadyFetchedMlokasi = false; _mpic = new Kalibrasi.Data.CollectionClasses.MPicCollection(new MPicEntityFactory()); _mpic.SetContainingEntityInfo(this, "Muser"); _alwaysFetchMpic = false; _alreadyFetchedMpic = false; _mhakAkses = null; _mhakAksesReturnsNewIfNotFound = true; _alwaysFetchMhakAkses = false; _alreadyFetchedMhakAkses = false; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
/// <summary> Removes the sync logic for member _mhakAkses</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 DesetupSyncMhakAkses(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity( _mhakAkses, new PropertyChangedEventHandler( OnMhakAksesPropertyChanged ), "MhakAkses", MUserEntity.Relations.MHakAksesEntityUsingCIdHakAkses, true, signalRelatedEntity, "Muser", resetFKFields, new int[] { (int)MUserFieldIndex.CIdHakAkses } ); _mhakAkses = null; }
/// <summary>Private CTor for deserialization</summary> /// <param name="info"></param> /// <param name="context"></param> protected MUserEntity(SerializationInfo info, StreamingContext context) : base(info, context) { _malat = (Kalibrasi.Data.CollectionClasses.MAlatCollection)info.GetValue("_malat", typeof(Kalibrasi.Data.CollectionClasses.MAlatCollection)); _alwaysFetchMalat = info.GetBoolean("_alwaysFetchMalat"); _alreadyFetchedMalat = info.GetBoolean("_alreadyFetchedMalat"); _mdepartement = (Kalibrasi.Data.CollectionClasses.MDepartementCollection)info.GetValue("_mdepartement", typeof(Kalibrasi.Data.CollectionClasses.MDepartementCollection)); _alwaysFetchMdepartement = info.GetBoolean("_alwaysFetchMdepartement"); _alreadyFetchedMdepartement = info.GetBoolean("_alreadyFetchedMdepartement"); _mlokasi = (Kalibrasi.Data.CollectionClasses.MLokasiCollection)info.GetValue("_mlokasi", typeof(Kalibrasi.Data.CollectionClasses.MLokasiCollection)); _alwaysFetchMlokasi = info.GetBoolean("_alwaysFetchMlokasi"); _alreadyFetchedMlokasi = info.GetBoolean("_alreadyFetchedMlokasi"); _mpic = (Kalibrasi.Data.CollectionClasses.MPicCollection)info.GetValue("_mpic", typeof(Kalibrasi.Data.CollectionClasses.MPicCollection)); _alwaysFetchMpic = info.GetBoolean("_alwaysFetchMpic"); _alreadyFetchedMpic = info.GetBoolean("_alreadyFetchedMpic"); _mhakAkses = (MHakAksesEntity)info.GetValue("_mhakAkses", typeof(MHakAksesEntity)); if(_mhakAkses!=null) { _mhakAkses.AfterSave+=new EventHandler(OnEntityAfterSave); } _mhakAksesReturnsNewIfNotFound = info.GetBoolean("_mhakAksesReturnsNewIfNotFound"); _alwaysFetchMhakAkses = info.GetBoolean("_alwaysFetchMhakAkses"); _alreadyFetchedMhakAkses = info.GetBoolean("_alreadyFetchedMhakAkses"); base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance(), PersistenceInfoProviderSingleton.GetInstance()); // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary>Creates a new, empty MHakAksesEntity object.</summary> /// <returns>A new, empty MHakAksesEntity object.</returns> public override IEntity Create() { IEntity toReturn = new MHakAksesEntity(); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewMHakAkses // __LLBLGENPRO_USER_CODE_REGION_END return toReturn; }