Exemplo n.º 1
0
            private static void SignificantFactTypeChangeDelayed(ModelElement element)
            {
                FactType factType;
                ORMModel model;

                if (!element.IsDeleted &&
                    !ORMElementGateway.IsElementExcluded(factType = (FactType)element) &&
                    null != (model = factType.Model))
                {
                    Objectification objectification = factType.Objectification;
                    if (objectification != null)
                    {
                        LinkedElementCollection <FactType> impliedFactTypes = objectification.ImpliedFactTypeCollection;
                        int impliedFactTypeCount = impliedFactTypes.Count;
                        for (int i = 0; i < impliedFactTypeCount; ++i)
                        {
                            FactType impliedFactType = impliedFactTypes[i];
                            AddTransactedModelElement(impliedFactType, ModelElementModification.ORMElementChanged);
                        }
                        if (impliedFactTypeCount == 1)
                        {
                            AddTransactedModelElement(factType, ModelElementModification.ORMElementChanged);
                        }
                    }
                    else
                    {
                        AddTransactedModelElement(factType, ModelElementModification.ORMElementChanged);
                    }
                    FrameworkDomainModel.DelayValidateElement(model, DelayValidateModel);
                }
            }
Exemplo n.º 2
0
            private static void FactTypeConstraintPatternChangedDelayed(ModelElement element)
            {
                FactType factType;
                ORMModel model;

                if (!element.IsDeleted &&
                    null != (model = (factType = (FactType)element).Model) &&
                    !ORMElementGateway.IsElementExcluded(factType))
                {
                    // If we're not previously mapped, then we will have been added at this point
                    FactTypeMapsTowardsRole mapToRole = FactTypeMapsTowardsRole.GetLinkToTowardsRole(factType);
                    if (mapToRole != null)
                    {
                        MappingMandatoryPattern startMandatoryPattern = mapToRole.MandatoryPattern;
                        if (mapToRole.SynchronizeMappingPatterns())
                        {
                            MappingMandatoryPattern endMandatoryPattern = mapToRole.MandatoryPattern;
                            if (endMandatoryPattern != startMandatoryPattern)
                            {
                                foreach (ConceptTypeChild child in ConceptTypeChildHasPathFactType.GetConceptTypeChild(factType))
                                {
                                    ValidateMandatory(child, startMandatoryPattern, endMandatoryPattern);
                                }
                            }
                        }
                        else
                        {
                            AddTransactedModelElement(factType, ModelElementModification.ORMElementChanged);
                            FrameworkDomainModel.DelayValidateElement(model, DelayValidateModel);
                        }
                    }
                }
            }
Exemplo n.º 3
0
 private static void SignificantObjectTypeChange(ObjectType objectType)
 {
     if (objectType != null &&
         !objectType.IsDeleted &&
         !ORMElementGateway.IsElementExcluded(objectType))
     {
         FrameworkDomainModel.DelayValidateElement(objectType, SignificantObjectTypeChangeDelayed);
     }
 }
Exemplo n.º 4
0
 private static void SignificantUniquenessConstraintChange(UniquenessConstraint constraint)
 {
     if (constraint != null &&
         !constraint.IsDeleted &&
         !ORMElementGateway.IsElementExcluded(constraint))
     {
         FrameworkDomainModel.DelayValidateElement(constraint, SignificantUniquenessConstraintChangeDelayed);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// The constraint pattern for a <see cref="FactType"/> may have changed
 /// </summary>
 private static void FactTypeConstraintPatternChanged(FactType factType)
 {
     if (factType != null &&
         !factType.IsDeleted &&
         null != factType.Model &&
         !ORMElementGateway.IsElementExcluded(factType))
     {
         FrameworkDomainModel.DelayValidateElement(factType, FactTypeConstraintPatternChangedDelayed);
     }
 }
Exemplo n.º 6
0
            private static void SignificantObjectTypeChangeDelayed(ModelElement element)
            {
                ObjectType objectType;
                ORMModel   model;

                if (!element.IsDeleted &&
                    null != (model = (objectType = (ObjectType)element).Model) &&
                    !ORMElementGateway.IsElementExcluded(objectType))
                {
                    AddTransactedModelElement(objectType, ModelElementModification.ORMElementChanged);
                    FrameworkDomainModel.DelayValidateElement(model, DelayValidateModel);
                }
            }
Exemplo n.º 7
0
            private static void SignificantUniquenessConstraintChangeDelayed(ModelElement element)
            {
                UniquenessConstraint constraint;
                ORMModel             model;

                if (!element.IsDeleted &&
                    null != (model = (constraint = (UniquenessConstraint)element).Model) &&
                    !ORMElementGateway.IsElementExcluded(constraint))
                {
                    AddTransactedModelElement(constraint, ModelElementModification.ORMElementChanged);
                    FrameworkDomainModel.DelayValidateElement(model, DelayValidateModel);
                }
            }