protected CheckListTemplateQuestionEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (SerializationHelper.Optimization != SerializationOptimization.Fast)
            {
                _checklistGroupQuestion = (ChecklistGroupQuestionEntity)info.GetValue("_checklistGroupQuestion", typeof(ChecklistGroupQuestionEntity));
                if (_checklistGroupQuestion != null)
                {
                    _checklistGroupQuestion.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _checkListQuestion = (CheckListQuestionEntity)info.GetValue("_checkListQuestion", typeof(CheckListQuestionEntity));
                if (_checkListQuestion != null)
                {
                    _checkListQuestion.AfterSave += new EventHandler(OnEntityAfterSave);
                }
                _checkListTemplate = (CheckListTemplateEntity)info.GetValue("_checkListTemplate", typeof(CheckListTemplateEntity));
                if (_checkListTemplate != null)
                {
                    _checkListTemplate.AfterSave += new EventHandler(OnEntityAfterSave);
                }

                base.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
            }

            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }
 /// <summary> setups the sync logic for member _checklistGroupQuestion</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncChecklistGroupQuestion(IEntity2 relatedEntity)
 {
     if (_checklistGroupQuestion != relatedEntity)
     {
         DesetupSyncChecklistGroupQuestion(true, true);
         _checklistGroupQuestion = (ChecklistGroupQuestionEntity)relatedEntity;
         base.PerformSetupSyncRelatedEntity(_checklistGroupQuestion, new PropertyChangedEventHandler(OnChecklistGroupQuestionPropertyChanged), "ChecklistGroupQuestion", CheckListTemplateQuestionEntity.Relations.ChecklistGroupQuestionEntityUsingGroupQuestionId, true, new string[] {  });
     }
 }
        /// <summary> Initializes the class members</summary>
        protected virtual void InitClassMembers()
        {
            _checklistGroupQuestion = null;
            _checkListQuestion      = null;
            _checkListTemplate      = null;

            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }
 /// <summary> Removes the sync logic for member _checklistGroupQuestion</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 DesetupSyncChecklistGroupQuestion(bool signalRelatedEntity, bool resetFKFields)
 {
     base.PerformDesetupSyncRelatedEntity(_checklistGroupQuestion, new PropertyChangedEventHandler(OnChecklistGroupQuestionPropertyChanged), "ChecklistGroupQuestion", CheckListTemplateQuestionEntity.Relations.ChecklistGroupQuestionEntityUsingGroupQuestionId, true, signalRelatedEntity, "CheckListTemplateQuestion", resetFKFields, new int[] { (int)CheckListTemplateQuestionFieldIndex.GroupQuestionId });
     _checklistGroupQuestion = null;
 }