Ejemplo n.º 1
0
        public GeneralizationRelationship Clone(CompositeType derivedType, CompositeType baseType)
        {
            GeneralizationRelationship generalization =
                new GeneralizationRelationship(derivedType, baseType);

            generalization.CopyFrom(this);
            return(generalization);
        }
Ejemplo n.º 2
0
        /// <exception cref="RelationshipException">
        /// Cannot create relationship between the two types.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="derivedType"/> or <paramref name="baseType"/> is null.
        /// </exception>
        public GeneralizationRelationship AddGeneralization(CompositeType derivedType,
                                                            CompositeType baseType)
        {
            GeneralizationRelationship generalization =
                new GeneralizationRelationship(derivedType, baseType);

            AddGeneralization(generalization);
            return(generalization);
        }
Ejemplo n.º 3
0
 public bool InsertGeneralization(GeneralizationRelationship generalization)
 {
     if (generalization != null && !relationships.Contains(generalization) &&
         entities.Contains(generalization.First) && entities.Contains(generalization.Second))
     {
         AddGeneralization(generalization);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 4
0
 protected virtual void AddGeneralization(GeneralizationRelationship generalization)
 {
     AddRelationship(generalization);
 }