Пример #1
0
 /// <summary>Creates a new IEntityField instance, which represents the field objectName.fieldName</summary>
 /// <param name="objectName">the name of the object the field belongs to, like CustomerEntity or OrdersTypedView</param>
 /// <param name="fieldName">the name of the field to create</param>
 public static IEntityField Create(string objectName, string fieldName)
 {
     return(new EntityField(FieldInfoProviderSingleton.GetInstance().GetFieldInfo(objectName, fieldName), PersistenceInfoProviderSingleton.GetInstance().GetFieldPersistenceInfo(objectName, fieldName)));
 }
Пример #2
0
 /// <summary>General factory entrance method which will return an EntityFields2 object with the format generated by the factory specified</summary>
 /// <param name="relatedEntityType">The type of entity the fields are for</param>
 /// <returns>The IEntityFields instance requested</returns>
 public static IEntityFields2 CreateEntityFieldsObject(SD.LLBLGen.Pro.Examples.Auditing.EntityType relatedEntityType)
 {
     return(FieldInfoProviderSingleton.GetInstance().GetEntityFields(InheritanceInfoProviderSingleton.GetInstance(), _entityTypeNamesCache[relatedEntityType]));
 }
Пример #3
0
 /// <summary>General method which will return an array of IEntityFieldCore objects, used by the InheritanceInfoProvider. Only the fields defined in the entity are returned, no inherited fields.</summary>
 /// <param name="entityName">the name of the entity to get the fields for. Example: "CustomerEntity"</param>
 /// <returns>array of IEntityFieldCore fields, defined in the entity with the name specified</returns>
 internal static IEntityFieldCore[] CreateFields(string entityName)
 {
     return(FieldInfoProviderSingleton.GetInstance().GetEntityFieldsArray(entityName));
 }
Пример #4
0
        /// <summary>Creates a new IEntityField instance for usage in the EntityFields object for the entity related to the field index specified.</summary>
        /// <param name="fieldIndex">The field which IEntityField instance should be created</param>
        /// <returns>The IEntityField instance for the field specified in fieldIndex</returns>
        public static IEntityField Create(Enum fieldIndex)
        {
            IFieldInfo info = FieldInfoProviderSingleton.GetInstance().GetFieldInfo(fieldIndex);

            return(new EntityField(info, PersistenceInfoProviderSingleton.GetInstance().GetFieldPersistenceInfo(info.ContainingObjectName, info.Name)));
        }
Пример #5
0
 /// <summary>General factory entrance method which will return an EntityFields object with the format generated by the factory specified</summary>
 /// <param name="relatedEntityType">The type of entity the fields are for</param>
 /// <returns>The IEntityFields instance requested</returns>
 public static IEntityFields CreateEntityFieldsObject(KSI.EntityType relatedEntityType)
 {
     return(FieldInfoProviderSingleton.GetInstance().GetEntityFields(InheritanceInfoProviderSingleton.GetInstance(), PersistenceInfoProviderSingleton.GetInstance(), _entityTypeNamesCache[relatedEntityType]));
 }
Пример #6
0
 /// <summary>
 /// 创建实体字段
 /// </summary>
 /// <param name="fieldIndex">字段索引</param>
 /// <returns>实体字段</returns>
 public static EntityField2 Create(VO_WF_LZXX_LSIndex fieldIndex)
 {
     return(new EntityField2(FieldInfoProviderSingleton.GetInstance().GetFieldInfo(VO_WF_LZXX_LS.EntityName, (int)fieldIndex)));
 }
Пример #7
0
        /// <summary>Creates a complete EntityFields instance for the SummaryOfSalesByYearEntity.</summary>
        /// <returns></returns>
        private static IEntityFields CreateSummaryOfSalesByYearTypedViewEntityFields()
        {
            IEntityFields fieldsToReturn = new EntityFields((int)SummaryOfSalesByYearFieldIndex.AmountOfFields, null, FieldInfoProviderSingleton.GetInstance().GetFieldIndexes("SummaryOfSalesByYearTypedView"));

            for (int i = 0; i < (int)SummaryOfSalesByYearFieldIndex.AmountOfFields; i++)
            {
                fieldsToReturn[i] = EntityFieldFactory.Create((SummaryOfSalesByYearFieldIndex)i);
            }
            return(fieldsToReturn);
        }
Пример #8
0
 /// <summary>Creates a new IEntityField2 instance for usage in the EntityFields object for the entity related to the field index specified.</summary>
 /// <param name="fieldIndex">The field which IEntityField2 instance should be created</param>
 /// <returns>The IEntityField2 instance for the field specified in fieldIndex</returns>
 public static IEntityField2 Create(Enum fieldIndex)
 {
     return(new EntityField2(FieldInfoProviderSingleton.GetInstance().GetFieldInfo(fieldIndex)));
 }
Пример #9
0
        /// <summary>Creates a complete EntityFields instance for the ProductsByCategoryEntity.</summary>
        /// <returns></returns>
        private static IEntityFields CreateProductsByCategoryTypedViewEntityFields()
        {
            IEntityFields fieldsToReturn = new EntityFields((int)ProductsByCategoryFieldIndex.AmountOfFields, null, FieldInfoProviderSingleton.GetInstance().GetFieldIndexes("ProductsByCategoryTypedView"));

            for (int i = 0; i < (int)ProductsByCategoryFieldIndex.AmountOfFields; i++)
            {
                fieldsToReturn[i] = EntityFieldFactory.Create((ProductsByCategoryFieldIndex)i);
            }
            return(fieldsToReturn);
        }
Пример #10
0
        /// <summary>Creates a complete EntityFields instance for the QuarterlyOrderEntity.</summary>
        /// <returns></returns>
        private static IEntityFields CreateQuarterlyOrderTypedViewEntityFields()
        {
            IEntityFields fieldsToReturn = new EntityFields((int)QuarterlyOrderFieldIndex.AmountOfFields, null, FieldInfoProviderSingleton.GetInstance().GetFieldIndexes("QuarterlyOrderTypedView"));

            for (int i = 0; i < (int)QuarterlyOrderFieldIndex.AmountOfFields; i++)
            {
                fieldsToReturn[i] = EntityFieldFactory.Create((QuarterlyOrderFieldIndex)i);
            }
            return(fieldsToReturn);
        }
Пример #11
0
        /// <summary>Creates a complete EntityFields instance for the OrderDetailsExtendedEntity.</summary>
        /// <returns></returns>
        private static IEntityFields CreateOrderDetailsExtendedTypedViewEntityFields()
        {
            IEntityFields fieldsToReturn = new EntityFields((int)OrderDetailsExtendedFieldIndex.AmountOfFields, null, FieldInfoProviderSingleton.GetInstance().GetFieldIndexes("OrderDetailsExtendedTypedView"));

            for (int i = 0; i < (int)OrderDetailsExtendedFieldIndex.AmountOfFields; i++)
            {
                fieldsToReturn[i] = EntityFieldFactory.Create((OrderDetailsExtendedFieldIndex)i);
            }
            return(fieldsToReturn);
        }
Пример #12
0
        /// <summary>Creates a complete EntityFields instance for the CustomerAndSuppliersByCityEntity.</summary>
        /// <returns></returns>
        private static IEntityFields CreateCustomerAndSuppliersByCityTypedViewEntityFields()
        {
            IEntityFields fieldsToReturn = new EntityFields((int)CustomerAndSuppliersByCityFieldIndex.AmountOfFields, null, FieldInfoProviderSingleton.GetInstance().GetFieldIndexes("CustomerAndSuppliersByCityTypedView"));

            for (int i = 0; i < (int)CustomerAndSuppliersByCityFieldIndex.AmountOfFields; i++)
            {
                fieldsToReturn[i] = EntityFieldFactory.Create((CustomerAndSuppliersByCityFieldIndex)i);
            }
            return(fieldsToReturn);
        }
Пример #13
0
        /// <summary>Creates a complete EntityFields instance for the AlphabeticalListOfProductEntity.</summary>
        /// <returns></returns>
        private static IEntityFields CreateAlphabeticalListOfProductTypedViewEntityFields()
        {
            IEntityFields fieldsToReturn = new EntityFields((int)AlphabeticalListOfProductFieldIndex.AmountOfFields, null, FieldInfoProviderSingleton.GetInstance().GetFieldIndexes("AlphabeticalListOfProductTypedView"));

            for (int i = 0; i < (int)AlphabeticalListOfProductFieldIndex.AmountOfFields; i++)
            {
                fieldsToReturn[i] = EntityFieldFactory.Create((AlphabeticalListOfProductFieldIndex)i);
            }
            return(fieldsToReturn);
        }
Пример #14
0
        /// <summary>Creates a complete EntityFields instance for the SohQuerySpecPocoEntity.</summary>
        private static IEntityFields2 CreateSohQuerySpecPocoTypedViewEntityFields()
        {
            IEntityFields2 fieldsToReturn = new EntityFields2((int)SohQuerySpecPocoFieldIndex.AmountOfFields, null, FieldInfoProviderSingleton.GetInstance().GetFieldIndexes("SohQuerySpecPocoTypedView"));

            for (int i = 0; i < (int)SohQuerySpecPocoFieldIndex.AmountOfFields; i++)
            {
                fieldsToReturn[i] = EntityFieldFactory.Create((SohQuerySpecPocoFieldIndex)i);
            }
            return(fieldsToReturn);
        }
Пример #15
0
 /// <summary>General factory entrance method which will return an EntityFields2 object with the format generated by the factory specified</summary>
 /// <param name="relatedEntityType">The type of entity the fields are for</param>
 /// <returns>The IEntityFields instance requested</returns>
 public static IEntityFields2 CreateEntityFieldsObject(AdventureWorks.Dal.Adapter.v51.EntityType relatedEntityType)
 {
     return(FieldInfoProviderSingleton.GetInstance().GetEntityFields(InheritanceInfoProviderSingleton.GetInstance(), _entityTypeNamesCache[relatedEntityType]));
 }