예제 #1
0
        private void ConvertAttributes()
        {
            this.Attributes           = new List <IBLAttribute>();
            this.PrimaryKeyAttributes = new List <IBLAttribute>();

            // ID-Attribut hinzufügen
            var pk = CustomBLAttribute.GetNewIDAttribute(this);

            this.Attributes.Add(pk);
            this.PrimaryKeyAttributes.Add(pk);


            foreach (var attr in coreInterface.Attributes)
            {
                if (attr is CoreRefAttribute)
                {
                    this.Attributes.Add(new RefBLAttribute((CoreRefAttribute)attr, this));
                }
                else
                {
                    this.Attributes.Add(new BaseBLAttribute((CoreBaseAttribute)attr, this));
                }
            }

            // Ggf. Mandant-Attribut hinzufügen
            if (coreInterface.IsMandant)
            {
                this.Attributes.Add(CustomBLAttribute.GetNewMandantAttribute(this));
            }

            // Technische Hilfsattribute hinzufügen
            this.Attributes.Add(CustomBLAttribute.GetNewTModifikationAttribute(this));
            this.Attributes.Add(CustomBLAttribute.GetNewTBemerkungAttribute(this));
            this.Attributes.Add(CustomBLAttribute.GetNewTBenutzerAttribute(this));
            this.Attributes.Add(CustomBLAttribute.GetNewTSystemAttribute(this));
            this.HistoryAttribute = CustomBLAttribute.GetNewTGueltigBisAttribute(this, this.ParentModel.FinestTimeAttribute);
            this.Attributes.Add(this.HistoryAttribute);
            this.Attributes.Add(CustomBLAttribute.GetNewTErstDatAttribute(this));
            this.Attributes.Add(CustomBLAttribute.GetNewTAendDatAttribute(this));
            this.Attributes.Add(CustomBLAttribute.GetNewTLadelaufNRAttribute(this));
        }
 private void AddTechnicalAttributes()
 {
     if (coreInterface.Type == CoreInterfaceType.DEF_TABLE ||
         coreInterface.Type == CoreInterfaceType.TEMPORAL_TABLE)
     {
         this.Attributes.Add(CustomBLAttribute.GetNewTBenutzerAttribute(this));
         this.Attributes.Add(CustomBLAttribute.GetNewTSystemAttribute(this));
         this.Attributes.Add(CustomBLAttribute.GetNewTErstDatAttribute(this));
         this.Attributes.Add(CustomBLAttribute.GetNewTAendDatAttribute(this));
     }
     else if (coreInterface.Type == CoreInterfaceType.DIM_TABLE ||
              coreInterface.Type == CoreInterfaceType.DIM_VIEW ||
              coreInterface.Type == CoreInterfaceType.FACT_TABLE)
     {
         this.Attributes.Add(CustomBLAttribute.GetNewTModifikationAttribute(this));
         this.Attributes.Add(CustomBLAttribute.GetNewTBemerkungAttribute(this));
         this.Attributes.Add(CustomBLAttribute.GetNewTBenutzerAttribute(this));
         this.Attributes.Add(CustomBLAttribute.GetNewTSystemAttribute(this));
         this.Attributes.Add(CustomBLAttribute.GetNewTErstDatAttribute(this));
         this.Attributes.Add(CustomBLAttribute.GetNewTAendDatAttribute(this));
         this.Attributes.Add(CustomBLAttribute.GetNewTLadelaufNRAttribute(this));
     }
 }