/////////////////////////////////////////////////////////////// // This is generated code. ////////////////////////////////////////////////////////////// // Code is generated using LLBLGen Pro version: 2.0.0.0 // Code is generated on: Saturday, February 24, 2007 10:00:22 PM // Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20 // Templates vendor: Solutions Design. // Templates version: ////////////////////////////////////////////////////////////// using System; using System.Data; using DataFeedFrameworkDAL; using DataFeedFrameworkDAL.HelperClasses; using SD.LLBLGen.Pro.ORMSupportClasses; namespace DataFeedFrameworkDAL.FactoryClasses { /// /// Generates IEntityFields instances for different kind of Entities. /// This class is generated. Do not modify. /// public partial class EntityFieldsFactory { /// /// Private CTor, no instantiation possible. /// private EntityFieldsFactory() { } /// General factory entrance method which will return an EntityFields object with the format generated by the factory specified /// The type of entity the fields are for /// The IEntityFields instance requested public static IEntityFields CreateEntityFieldsObject(EntityType relatedEntityType) { IEntityFields fieldsToReturn=null; IInheritanceInfoProvider inheritanceProvider = InheritanceInfoProviderSingleton.GetInstance(); IFieldInfoProvider fieldProvider = FieldInfoProviderSingleton.GetInstance(); switch(relatedEntityType) { case DataFeedFrameworkDAL.EntityType.FeedCreationEntity: fieldsToReturn = new EntityFields((int)FeedCreationFieldIndex.AmountOfFields, inheritanceProvider, fieldProvider.GetFieldIndexes("FeedCreationEntity")); CreateFeedCreationEntityFields(ref fieldsToReturn); break; case DataFeedFrameworkDAL.EntityType.SnippetEntity: fieldsToReturn = new EntityFields((int)SnippetFieldIndex.AmountOfFields, inheritanceProvider, fieldProvider.GetFieldIndexes("SnippetEntity")); CreateSnippetEntityFields(ref fieldsToReturn); break; case DataFeedFrameworkDAL.EntityType.SnippetGroupEntity: fieldsToReturn = new EntityFields((int)SnippetGroupFieldIndex.AmountOfFields, inheritanceProvider, fieldProvider.GetFieldIndexes("SnippetGroupEntity")); CreateSnippetGroupEntityFields(ref fieldsToReturn); break; } return fieldsToReturn; } /// 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. /// the name of the entity to get the fields for. Example: "CustomerEntity" /// array of IEntityFieldCore fields, defined in the entity with the name specified internal static IEntityFieldCore[] CreateFields(string entityName) { IEntityFieldCore[] toReturn = null; switch(entityName) { default: break; } return toReturn; } /// Creates a complete EntityFields instance for the FeedCreationEntity. /// the fields object to fill private static void CreateFeedCreationEntityFields(ref IEntityFields fieldsToFill) { for(int i=0;i<(int)FeedCreationFieldIndex.AmountOfFields;i++) { fieldsToFill[i] = EntityFieldFactory.Create((FeedCreationFieldIndex)i); } } /// Creates a complete EntityFields instance for the SnippetEntity. /// the fields object to fill private static void CreateSnippetEntityFields(ref IEntityFields fieldsToFill) { for(int i=0;i<(int)SnippetFieldIndex.AmountOfFields;i++) { fieldsToFill[i] = EntityFieldFactory.Create((SnippetFieldIndex)i); } } /// Creates a complete EntityFields instance for the SnippetGroupEntity. /// the fields object to fill private static void CreateSnippetGroupEntityFields(ref IEntityFields fieldsToFill) { for(int i=0;i<(int)SnippetGroupFieldIndex.AmountOfFields;i++) { fieldsToFill[i] = EntityFieldFactory.Create((SnippetGroupFieldIndex)i); } } #region Included Code #endregion } }