/// <summary>Creates a new, empty Entity object of the type specified</summary> /// <param name="entityTypeToCreate">The entity type to create.</param> /// <returns>A new, empty Entity object.</returns> public static IEntity2 Create(LLBLGenTest.LLBL.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch(entityTypeToCreate) { case LLBLGenTest.LLBL.EntityType.Category1Entity: factoryToUse = new Category1EntityFactory(); break; case LLBLGenTest.LLBL.EntityType.Category1PostEntity: factoryToUse = new Category1PostEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.Category2Entity: factoryToUse = new Category2EntityFactory(); break; case LLBLGenTest.LLBL.EntityType.Category2PostEntity: factoryToUse = new Category2PostEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.MainPageBannerEntity: factoryToUse = new MainPageBannerEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.PostEntity: factoryToUse = new PostEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.PostAttachmentEntity: factoryToUse = new PostAttachmentEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.PostTagEntity: factoryToUse = new PostTagEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.SysLanguageEntity: factoryToUse = new SysLanguageEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.SysLogEntity: factoryToUse = new SysLogEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.SysMltextEntity: factoryToUse = new SysMltextEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.SysMltranslationEntity: factoryToUse = new SysMltranslationEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.SysSettingEntity: factoryToUse = new SysSettingEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.SysTransactionEntity: factoryToUse = new SysTransactionEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.SysUserEntity: factoryToUse = new SysUserEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.TagEntity: factoryToUse = new TagEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.TeamEntity: factoryToUse = new TeamEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.TeamPostEntity: factoryToUse = new TeamPostEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.TextContentEntity: factoryToUse = new TextContentEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.VideoEntity: factoryToUse = new VideoEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.WeeklyProgrammeDayEntity: factoryToUse = new WeeklyProgrammeDayEntityFactory(); break; case LLBLGenTest.LLBL.EntityType.WeeklyProgrammeMatchEntity: factoryToUse = new WeeklyProgrammeMatchEntityFactory(); break; } IEntity2 toReturn = null; if(factoryToUse != null) { toReturn = factoryToUse.Create(); } return toReturn; }
/// <summary>Gets the factory of the entity with the LLBLGenTest.LLBL.EntityType specified</summary> /// <param name="typeOfEntity">The type of entity.</param> /// <returns>factory to use or null if not found</returns> public static IEntityFactory2 GetFactory(LLBLGenTest.LLBL.EntityType typeOfEntity) { return GetFactory(GeneralEntityFactory.Create(typeOfEntity).GetType()); }
/// <summary>CTor</summary> /// <param name="entityName">Name of the entity.</param> /// <param name="typeOfEntity">The type of entity.</param> public EntityFactoryBase2(string entityName, LLBLGenTest.LLBL.EntityType typeOfEntity) { _entityName = entityName; _typeOfEntity = typeOfEntity; }
/// <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 IEntityFields2 instance requested</returns> public static IEntityFields2 CreateEntityFieldsObject(LLBLGenTest.LLBL.EntityType relatedEntityType) { IEntityFields2 fieldsToReturn=null; IInheritanceInfoProvider inheritanceProvider = InheritanceInfoProviderSingleton.GetInstance(); IFieldInfoProvider fieldProvider = FieldInfoProviderSingleton.GetInstance(); switch(relatedEntityType) { case LLBLGenTest.LLBL.EntityType.Category1Entity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "Category1Entity"); break; case LLBLGenTest.LLBL.EntityType.Category1PostEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "Category1PostEntity"); break; case LLBLGenTest.LLBL.EntityType.Category2Entity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "Category2Entity"); break; case LLBLGenTest.LLBL.EntityType.Category2PostEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "Category2PostEntity"); break; case LLBLGenTest.LLBL.EntityType.MainPageBannerEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "MainPageBannerEntity"); break; case LLBLGenTest.LLBL.EntityType.PostEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "PostEntity"); break; case LLBLGenTest.LLBL.EntityType.PostAttachmentEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "PostAttachmentEntity"); break; case LLBLGenTest.LLBL.EntityType.PostTagEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "PostTagEntity"); break; case LLBLGenTest.LLBL.EntityType.SysLanguageEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "SysLanguageEntity"); break; case LLBLGenTest.LLBL.EntityType.SysLogEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "SysLogEntity"); break; case LLBLGenTest.LLBL.EntityType.SysMltextEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "SysMltextEntity"); break; case LLBLGenTest.LLBL.EntityType.SysMltranslationEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "SysMltranslationEntity"); break; case LLBLGenTest.LLBL.EntityType.SysSettingEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "SysSettingEntity"); break; case LLBLGenTest.LLBL.EntityType.SysTransactionEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "SysTransactionEntity"); break; case LLBLGenTest.LLBL.EntityType.SysUserEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "SysUserEntity"); break; case LLBLGenTest.LLBL.EntityType.TagEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "TagEntity"); break; case LLBLGenTest.LLBL.EntityType.TeamEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "TeamEntity"); break; case LLBLGenTest.LLBL.EntityType.TeamPostEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "TeamPostEntity"); break; case LLBLGenTest.LLBL.EntityType.TextContentEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "TextContentEntity"); break; case LLBLGenTest.LLBL.EntityType.VideoEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "VideoEntity"); break; case LLBLGenTest.LLBL.EntityType.WeeklyProgrammeDayEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "WeeklyProgrammeDayEntity"); break; case LLBLGenTest.LLBL.EntityType.WeeklyProgrammeMatchEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, "WeeklyProgrammeMatchEntity"); break; } return fieldsToReturn; }
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary> /// <param name="leftOperand">The left operand, which is an entity.</param> /// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param> /// <param name="rightOperand">The right operand which is an entity.</param> /// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the left operand (only alias if you have to), specify string.Empty.</param> /// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param> /// <param name="onClause">The on clause for the join.</param> public DynamicRelation(LLBLGenTest.LLBL.EntityType leftOperand, JoinHint joinType, LLBLGenTest.LLBL.EntityType rightOperand, string aliasLeftOperand, string aliasRightOperand, IPredicate onClause) { base.InitClass(joinType, aliasLeftOperand, aliasRightOperand, onClause, GeneralEntityFactory.Create(leftOperand), GeneralEntityFactory.Create(rightOperand)); }
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary> /// <param name="leftOperand">The left operand.</param> /// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param> /// <param name="rightOperand">The right operand which is an entity type.</param> /// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param> /// <param name="onClause">The on clause for the join.</param> public DynamicRelation(DerivedTableDefinition leftOperand, JoinHint joinType, LLBLGenTest.LLBL.EntityType rightOperand, string aliasRightOperand, IPredicate onClause) { base.InitClass(joinType, string.Empty, aliasRightOperand, onClause, leftOperand, GeneralEntityFactory.Create(rightOperand)); }