/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary> /// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param> /// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param> /// <returns>the factory for the entity which is represented by the values passed in.</returns> public override IEntityFactory2 GetEntityFactory(object[] fieldValues, Dictionary <string, int> entityFieldStartIndexesPerEntity) { IEntityFactory2 toReturn = (IEntityFactory2)InheritanceInfoProviderSingleton.GetInstance().GetEntityFactory(this.ForEntityName, fieldValues, entityFieldStartIndexesPerEntity); if (toReturn == null) { toReturn = this; } return(toReturn); }
/// <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(DAL.ManageDocument.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case DAL.ManageDocument.EntityType.CauHinhEntity: factoryToUse = new CauHinhEntityFactory(); break; case DAL.ManageDocument.EntityType.ChuyenVienEntity: factoryToUse = new ChuyenVienEntityFactory(); break; case DAL.ManageDocument.EntityType.CongTyDoVeEntity: factoryToUse = new CongTyDoVeEntityFactory(); break; case DAL.ManageDocument.EntityType.HuyenEntity: factoryToUse = new HuyenEntityFactory(); break; case DAL.ManageDocument.EntityType.LoaiBienDongEntity: factoryToUse = new LoaiBienDongEntityFactory(); break; case DAL.ManageDocument.EntityType.LoaiGiayToEntity: factoryToUse = new LoaiGiayToEntityFactory(); break; case DAL.ManageDocument.EntityType.NguoiDungEntity: factoryToUse = new NguoiDungEntityFactory(); break; case DAL.ManageDocument.EntityType.ThongTinHoSoEntity: factoryToUse = new ThongTinHoSoEntityFactory(); break; case DAL.ManageDocument.EntityType.TinhEntity: factoryToUse = new TinhEntityFactory(); break; case DAL.ManageDocument.EntityType.XaEntity: factoryToUse = new XaEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }
/// <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(EntityModel.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case EntityModel.EntityType.PersonEntity: factoryToUse = new PersonEntityFactory(); break; case EntityModel.EntityType.ActorEntity: factoryToUse = new ActorEntityFactory(); break; case EntityModel.EntityType.ActorIncidentEntity: factoryToUse = new ActorIncidentEntityFactory(); break; case EntityModel.EntityType.CollectionEntity: factoryToUse = new CollectionEntityFactory(); break; case EntityModel.EntityType.IncidentEntity: factoryToUse = new IncidentEntityFactory(); break; case EntityModel.EntityType.ItemEntity: factoryToUse = new ItemEntityFactory(); break; case EntityModel.EntityType.DomainItemEntity: factoryToUse = new DomainItemEntityFactory(); break; case EntityModel.EntityType.SpecificItemEntity: factoryToUse = new SpecificItemEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }
/// <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(Let3arafo.Data.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case Let3arafo.Data.EntityType.CommunityEntity: factoryToUse = new CommunityEntityFactory(); break; case Let3arafo.Data.EntityType.CommunityCategoryEntity: factoryToUse = new CommunityCategoryEntityFactory(); break; case Let3arafo.Data.EntityType.CommunityUserEntity: factoryToUse = new CommunityUserEntityFactory(); break; case Let3arafo.Data.EntityType.CompanyEntity: factoryToUse = new CompanyEntityFactory(); break; case Let3arafo.Data.EntityType.PersonEntity: factoryToUse = new PersonEntityFactory(); break; case Let3arafo.Data.EntityType.PostEntity: factoryToUse = new PostEntityFactory(); break; case Let3arafo.Data.EntityType.PostContentEntity: factoryToUse = new PostContentEntityFactory(); break; case Let3arafo.Data.EntityType.UserEntity: factoryToUse = new UserEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }
/// <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(SD.LLBLGen.Pro.Examples.Authorization.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case SD.LLBLGen.Pro.Examples.Authorization.EntityType.CustomersEntity: factoryToUse = new CustomersEntityFactory(); break; case SD.LLBLGen.Pro.Examples.Authorization.EntityType.EmployeesEntity: factoryToUse = new EmployeesEntityFactory(); break; case SD.LLBLGen.Pro.Examples.Authorization.EntityType.GroupEntity: factoryToUse = new GroupEntityFactory(); break; case SD.LLBLGen.Pro.Examples.Authorization.EntityType.OrderDetailsEntity: factoryToUse = new OrderDetailsEntityFactory(); break; case SD.LLBLGen.Pro.Examples.Authorization.EntityType.OrdersEntity: factoryToUse = new OrdersEntityFactory(); break; case SD.LLBLGen.Pro.Examples.Authorization.EntityType.UserEntity: factoryToUse = new UserEntityFactory(); break; case SD.LLBLGen.Pro.Examples.Authorization.EntityType.UserGroupEntity: factoryToUse = new UserGroupEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }
/// <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(Project.DAL.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case Project.DAL.EntityType.VehicleMakeEntity: factoryToUse = new VehicleMakeEntityFactory(); break; case Project.DAL.EntityType.VehicleModelEntity: factoryToUse = new VehicleModelEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }
/// <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(BlazorTests.Server.Entities.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case BlazorTests.Server.Entities.EntityType.CustomerEntity: factoryToUse = new CustomerEntityFactory(); break; case BlazorTests.Server.Entities.EntityType.CustomerTypeEntity: factoryToUse = new CustomerTypeEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }
/// <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(SD.LLBLGen.Pro.Examples.WCF.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case SD.LLBLGen.Pro.Examples.WCF.EntityType.CategoryEntity: factoryToUse = new CategoryEntityFactory(); break; case SD.LLBLGen.Pro.Examples.WCF.EntityType.CustomerEntity: factoryToUse = new CustomerEntityFactory(); break; case SD.LLBLGen.Pro.Examples.WCF.EntityType.EmployeeEntity: factoryToUse = new EmployeeEntityFactory(); break; case SD.LLBLGen.Pro.Examples.WCF.EntityType.OrderEntity: factoryToUse = new OrderEntityFactory(); break; case SD.LLBLGen.Pro.Examples.WCF.EntityType.OrderDetailsEntity: factoryToUse = new OrderDetailsEntityFactory(); break; case SD.LLBLGen.Pro.Examples.WCF.EntityType.ProductEntity: factoryToUse = new ProductEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }
/// <summary>CTor</summary> /// <param name="entityFactoryToUse">The entity factory object to use when this collection has to construct new objects.</param> public EntityCollection(IEntityFactory2 entityFactoryToUse) : base(entityFactoryToUse) { }
/// <summary>CTor</summary> /// <param name="entityFactoryToUse">The entity factory object to use when this collection has to construct new objects.</param> public EntityCollection(IEntityFactory2 entityFactoryToUse) : base(entityFactoryToUse) { }
/// <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(Northwind.DAL.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case Northwind.DAL.EntityType.AuditActionTypeEntity: factoryToUse = new AuditActionTypeEntityFactory(); break; case Northwind.DAL.EntityType.AuditInfoEntity: factoryToUse = new AuditInfoEntityFactory(); break; case Northwind.DAL.EntityType.CategoryEntity: factoryToUse = new CategoryEntityFactory(); break; case Northwind.DAL.EntityType.CustomerEntity: factoryToUse = new CustomerEntityFactory(); break; case Northwind.DAL.EntityType.CustomerCustomerDemoEntity: factoryToUse = new CustomerCustomerDemoEntityFactory(); break; case Northwind.DAL.EntityType.CustomerDemographicEntity: factoryToUse = new CustomerDemographicEntityFactory(); break; case Northwind.DAL.EntityType.EmployeeEntity: factoryToUse = new EmployeeEntityFactory(); break; case Northwind.DAL.EntityType.EmployeeTerritoryEntity: factoryToUse = new EmployeeTerritoryEntityFactory(); break; case Northwind.DAL.EntityType.GroupEntity: factoryToUse = new GroupEntityFactory(); break; case Northwind.DAL.EntityType.OrderEntity: factoryToUse = new OrderEntityFactory(); break; case Northwind.DAL.EntityType.OrderAuditInfoEntity: factoryToUse = new OrderAuditInfoEntityFactory(); break; case Northwind.DAL.EntityType.OrderDetailEntity: factoryToUse = new OrderDetailEntityFactory(); break; case Northwind.DAL.EntityType.ProductEntity: factoryToUse = new ProductEntityFactory(); break; case Northwind.DAL.EntityType.RegionEntity: factoryToUse = new RegionEntityFactory(); break; case Northwind.DAL.EntityType.ShipperEntity: factoryToUse = new ShipperEntityFactory(); break; case Northwind.DAL.EntityType.SupplierEntity: factoryToUse = new SupplierEntityFactory(); break; case Northwind.DAL.EntityType.TerritoryEntity: factoryToUse = new TerritoryEntityFactory(); break; case Northwind.DAL.EntityType.UserEntity: factoryToUse = new UserEntityFactory(); break; case Northwind.DAL.EntityType.UserGroupEntity: factoryToUse = new UserGroupEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }
/// <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(SD.LLBLGen.Pro.Examples.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case SD.LLBLGen.Pro.Examples.EntityType.CategoryEntity: factoryToUse = new CategoryEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.CustomerEntity: factoryToUse = new CustomerEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.CustomerCustomerDemoEntity: factoryToUse = new CustomerCustomerDemoEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.CustomerDemographyEntity: factoryToUse = new CustomerDemographyEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.EmployeeEntity: factoryToUse = new EmployeeEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.EmployeeTerritoryEntity: factoryToUse = new EmployeeTerritoryEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.OrderEntity: factoryToUse = new OrderEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.OrderDetailEntity: factoryToUse = new OrderDetailEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.ProductEntity: factoryToUse = new ProductEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.RegionEntity: factoryToUse = new RegionEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.ShipperEntity: factoryToUse = new ShipperEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.SupplierEntity: factoryToUse = new SupplierEntityFactory(); break; case SD.LLBLGen.Pro.Examples.EntityType.TerritoryEntity: factoryToUse = new TerritoryEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }
/// <summary> /// CTor /// </summary> /// <param name="entityFactoryToUse">The entity factory object to use when this collection has to construct new objects. /// This is the case when the collection is bound to a grid-like control for example.</param> /// <param name="validatorToUse">The validator object to use for new entities constructed using the entity factory. Ignored when null</param> public EntityCollection(IEntityFactory2 entityFactoryToUse, IValidator validatorToUse) : base(entityFactoryToUse, validatorToUse) { }
public static void PrintSchema(IEntityFactory2 factory, IPrefetchPath2 prefetchPath) { PrintSchema(factory.Create(), prefetchPath); }
public static void PrintSchema(IEntityFactory2 factory) { PrintSchema(factory.Create(), null); }
/// <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(NinjaSoftware.EnioNg.CoolJ.EntityType entityTypeToCreate) { IEntityFactory2 factoryToUse = null; switch (entityTypeToCreate) { case NinjaSoftware.EnioNg.CoolJ.EntityType.ArtiklEntity: factoryToUse = new ArtiklEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.AuditInfoEntity: factoryToUse = new AuditInfoEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.AuditInfoActionTypeRoEntity: factoryToUse = new AuditInfoActionTypeRoEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.BrojacEntity: factoryToUse = new BrojacEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.ConfigEntity: factoryToUse = new ConfigEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.EntityRoEntity: factoryToUse = new EntityRoEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.ErrorEntity: factoryToUse = new ErrorEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.FirmaEntity: factoryToUse = new FirmaEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.PartnerEntity: factoryToUse = new PartnerEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.PdvEntity: factoryToUse = new PdvEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.RacunGlavaEntity: factoryToUse = new RacunGlavaEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.RacunStavkaEntity: factoryToUse = new RacunStavkaEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.RoleRoEntity: factoryToUse = new RoleRoEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.StatusRoEntity: factoryToUse = new StatusRoEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.TarifaEntity: factoryToUse = new TarifaEntityFactory(); break; case NinjaSoftware.EnioNg.CoolJ.EntityType.UserEntity: factoryToUse = new UserEntityFactory(); break; } IEntity2 toReturn = null; if (factoryToUse != null) { toReturn = factoryToUse.Create(); } return(toReturn); }