/// <summary> setups the sync logic for member _tag</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncTag(IEntity2 relatedEntity) { if (_tag != relatedEntity) { DesetupSyncTag(true, true); _tag = (TagEntity)relatedEntity; base.PerformSetupSyncRelatedEntity(_tag, new PropertyChangedEventHandler(OnTagPropertyChanged), "Tag", PostTagEntity.Relations.TagEntityUsingFkTagId, true, new string[] { }); } }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _post = null; _tag = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
protected PostTagEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _post = (PostEntity)info.GetValue("_post", typeof(PostEntity)); if (_post != null) { _post.AfterSave += new EventHandler(OnEntityAfterSave); } _tag = (TagEntity)info.GetValue("_tag", typeof(TagEntity)); if (_tag != null) { _tag.AfterSave += new EventHandler(OnEntityAfterSave); } base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance()); } // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor // __LLBLGENPRO_USER_CODE_REGION_END }
/// <summary>Creates a new TagEntity 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 TagEntity(fields); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewTagUsingFields // __LLBLGENPRO_USER_CODE_REGION_END return toReturn; }
/// <summary>Creates a new, empty TagEntity object.</summary> /// <returns>A new, empty TagEntity object.</returns> public override IEntity2 Create() { IEntity2 toReturn = new TagEntity(); // __LLBLGENPRO_USER_CODE_REGION_START CreateNewTag // __LLBLGENPRO_USER_CODE_REGION_END return toReturn; }
/// <summary> setups the sync logic for member _tag</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncTag(IEntity2 relatedEntity) { if(_tag!=relatedEntity) { DesetupSyncTag(true, true); _tag = (TagEntity)relatedEntity; base.PerformSetupSyncRelatedEntity( _tag, new PropertyChangedEventHandler( OnTagPropertyChanged ), "Tag", PostTagEntity.Relations.TagEntityUsingFkTagId, true, new string[] { } ); } }
/// <summary> Removes the sync logic for member _tag</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 DesetupSyncTag(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity( _tag, new PropertyChangedEventHandler( OnTagPropertyChanged ), "Tag", PostTagEntity.Relations.TagEntityUsingFkTagId, true, signalRelatedEntity, "PostTag", resetFKFields, new int[] { (int)PostTagFieldIndex.FkTagId } ); _tag = null; }
/// <summary> Initializes the class members</summary> protected virtual void InitClassMembers() { _post = null; _tag = null; PerformDependencyInjection(); // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers // __LLBLGENPRO_USER_CODE_REGION_END OnInitClassMembersComplete(); }
protected PostTagEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _post = (PostEntity)info.GetValue("_post", typeof(PostEntity)); if(_post!=null) { _post.AfterSave+=new EventHandler(OnEntityAfterSave); } _tag = (TagEntity)info.GetValue("_tag", typeof(TagEntity)); if(_tag!=null) { _tag.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(TagEntity.GetRelationsForField(fieldName)); }
/// <summary> Removes the sync logic for member _tag</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 DesetupSyncTag(bool signalRelatedEntity, bool resetFKFields) { base.PerformDesetupSyncRelatedEntity(_tag, new PropertyChangedEventHandler(OnTagPropertyChanged), "Tag", PostTagEntity.Relations.TagEntityUsingFkTagId, true, signalRelatedEntity, "PostTag", resetFKFields, new int[] { (int)PostTagFieldIndex.FkTagId }); _tag = null; }