/// <summary> setups the sync logic for member _category2</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncCategory2(IEntity2 relatedEntity) { if (_category2 != relatedEntity) { DesetupSyncCategory2(true, true); _category2 = (Category2Entity)relatedEntity; base.PerformSetupSyncRelatedEntity(_category2, new PropertyChangedEventHandler(OnCategory2PropertyChanged), "Category2", Category2PostEntity.Relations.Category2EntityUsingFkCategory2Id, true, new string[] { }); } }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _category2 = null; _post = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
protected Category2PostEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _category2 = (Category2Entity)info.GetValue("_category2", typeof(Category2Entity)); if (_category2 != null) { _category2.AfterSave += new EventHandler(OnEntityAfterSave); } _post = (PostEntity)info.GetValue("_post", typeof(PostEntity)); if (_post != null) { _post.AfterSave += new EventHandler(OnEntityAfterSave); } base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary>Creates a new Category2Entity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary> /// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param> /// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns> public override IEntity2 Create(IEntityFields2 fields) { IEntity2 toReturn = new Category2Entity(fields); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewCategory2UsingFields // __LLBLGENPRO_USER_CODE_REGION_END return toReturn; }
/// <summary>Creates a new, empty Category2Entity object.</summary> /// <returns>A new, empty Category2Entity object.</returns> public override IEntity2 Create() { IEntity2 toReturn = new Category2Entity(); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewCategory2 // __LLBLGENPRO_USER_CODE_REGION_END return toReturn; }
/// <summary> Removes the sync logic for member _category2</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 DesetupSyncCategory2(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity(_category2, new PropertyChangedEventHandler(OnCategory2PropertyChanged), "Category2", Category2PostEntity.Relations.Category2EntityUsingFkCategory2Id, true, signalRelatedEntity, "Category2Post", resetFKFields, new int[] { (int)Category2PostFieldIndex.FkCategory2Id }); _category2 = null; }
/// <summary> setups the sync logic for member _category2</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncCategory2(IEntity2 relatedEntity) { if(_category2!=relatedEntity) { DesetupSyncCategory2(true, true); _category2 = (Category2Entity)relatedEntity; base.PerformSetupSyncRelatedEntity( _category2, new PropertyChangedEventHandler( OnCategory2PropertyChanged ), "Category2", Category2PostEntity.Relations.Category2EntityUsingFkCategory2Id, true, new string[] { } ); } }
/// <summary> Removes the sync logic for member _category2</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 DesetupSyncCategory2(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity( _category2, new PropertyChangedEventHandler( OnCategory2PropertyChanged ), "Category2", Category2PostEntity.Relations.Category2EntityUsingFkCategory2Id, true, signalRelatedEntity, "Category2Post", resetFKFields, new int[] { (int)Category2PostFieldIndex.FkCategory2Id } ); _category2 = null; }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _category2 = null; _post = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
protected Category2PostEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _category2 = (Category2Entity)info.GetValue("_category2", typeof(Category2Entity)); if(_category2!=null) { _category2.AfterSave+=new EventHandler(OnEntityAfterSave); } _post = (PostEntity)info.GetValue("_post", typeof(PostEntity)); if(_post!=null) { _post.AfterSave+=new EventHandler(OnEntityAfterSave); } base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary> /// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param> /// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns> public override RelationCollection GetRelationsForFieldOfType(string fieldName) { return(Category2Entity.GetRelationsForField(fieldName)); }