/// <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(Kalibrasi.Data.EntityType relatedEntityType)
 {
     IEntityFields fieldsToReturn=null;
     IInheritanceInfoProvider inheritanceProvider = InheritanceInfoProviderSingleton.GetInstance();
     IFieldInfoProvider fieldProvider = FieldInfoProviderSingleton.GetInstance();
     IPersistenceInfoProvider persistenceProvider = PersistenceInfoProviderSingleton.GetInstance();
     switch(relatedEntityType)
     {
         case Kalibrasi.Data.EntityType.MAlatEntity:
             fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "MAlatEntity");
             break;
         case Kalibrasi.Data.EntityType.MDepartementEntity:
             fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "MDepartementEntity");
             break;
         case Kalibrasi.Data.EntityType.MHakAksesEntity:
             fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "MHakAksesEntity");
             break;
         case Kalibrasi.Data.EntityType.MLokasiEntity:
             fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "MLokasiEntity");
             break;
         case Kalibrasi.Data.EntityType.MPicEntity:
             fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "MPicEntity");
             break;
         case Kalibrasi.Data.EntityType.MUserEntity:
             fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "MUserEntity");
             break;
         case Kalibrasi.Data.EntityType.THistoryAlatEntity:
             fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "THistoryAlatEntity");
             break;
         case Kalibrasi.Data.EntityType.THistoryJadwalEntity:
             fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "THistoryJadwalEntity");
             break;
         case Kalibrasi.Data.EntityType.TJadwalEntity:
             fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "TJadwalEntity");
             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(Kalibrasi.Data.EntityType leftOperand, JoinHint joinType, Kalibrasi.Data.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, Kalibrasi.Data.EntityType rightOperand, string aliasRightOperand, IPredicate onClause)
 {
     base.InitClass(joinType, string.Empty, aliasRightOperand, onClause, leftOperand, GeneralEntityFactory.Create(rightOperand));
 }
 /// <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 IEntity Create(Kalibrasi.Data.EntityType entityTypeToCreate)
 {
     IEntityFactory factoryToUse = null;
     switch(entityTypeToCreate)
     {
         case Kalibrasi.Data.EntityType.MAlatEntity:
             factoryToUse = new MAlatEntityFactory();
             break;
         case Kalibrasi.Data.EntityType.MDepartementEntity:
             factoryToUse = new MDepartementEntityFactory();
             break;
         case Kalibrasi.Data.EntityType.MHakAksesEntity:
             factoryToUse = new MHakAksesEntityFactory();
             break;
         case Kalibrasi.Data.EntityType.MLokasiEntity:
             factoryToUse = new MLokasiEntityFactory();
             break;
         case Kalibrasi.Data.EntityType.MPicEntity:
             factoryToUse = new MPicEntityFactory();
             break;
         case Kalibrasi.Data.EntityType.MUserEntity:
             factoryToUse = new MUserEntityFactory();
             break;
         case Kalibrasi.Data.EntityType.THistoryAlatEntity:
             factoryToUse = new THistoryAlatEntityFactory();
             break;
         case Kalibrasi.Data.EntityType.THistoryJadwalEntity:
             factoryToUse = new THistoryJadwalEntityFactory();
             break;
         case Kalibrasi.Data.EntityType.TJadwalEntity:
             factoryToUse = new TJadwalEntityFactory();
             break;
     }
     IEntity toReturn = null;
     if(factoryToUse != null)
     {
         toReturn = factoryToUse.Create();
     }
     return toReturn;
 }
 /// <summary>Creates a new entity collection</summary>
 /// <param name="typeToUse">The entity type to create the collection for.</param>
 /// <returns>A new entity collection object.</returns>
 public static IEntityCollection Create(Kalibrasi.Data.EntityType typeToUse)
 {
     switch(typeToUse)
     {
         case Kalibrasi.Data.EntityType.MAlatEntity:
             return new MAlatCollection();
         case Kalibrasi.Data.EntityType.MDepartementEntity:
             return new MDepartementCollection();
         case Kalibrasi.Data.EntityType.MHakAksesEntity:
             return new MHakAksesCollection();
         case Kalibrasi.Data.EntityType.MLokasiEntity:
             return new MLokasiCollection();
         case Kalibrasi.Data.EntityType.MPicEntity:
             return new MPicCollection();
         case Kalibrasi.Data.EntityType.MUserEntity:
             return new MUserCollection();
         case Kalibrasi.Data.EntityType.THistoryAlatEntity:
             return new THistoryAlatCollection();
         case Kalibrasi.Data.EntityType.THistoryJadwalEntity:
             return new THistoryJadwalCollection();
         case Kalibrasi.Data.EntityType.TJadwalEntity:
             return new TJadwalCollection();
         default:
             return null;
     }
 }
 /// <summary>Gets the factory of the entity with the Kalibrasi.Data.EntityType specified</summary>
 /// <param name="typeOfEntity">The type of entity.</param>
 /// <returns>factory to use or null if not found</returns>
 public static IEntityFactory GetFactory(Kalibrasi.Data.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 EntityFactoryBase(string entityName, Kalibrasi.Data.EntityType typeOfEntity)
 {
     _entityName = entityName;
     _typeOfEntity = typeOfEntity;
 }