/// <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(silverspun.RGBDiff.Dal.EntityType relatedEntityType) { IEntityFields fieldsToReturn = null; IInheritanceInfoProvider inheritanceProvider = InheritanceInfoProviderSingleton.GetInstance(); IFieldInfoProvider fieldProvider = FieldInfoProviderSingleton.GetInstance(); IPersistenceInfoProvider persistenceProvider = PersistenceInfoProviderSingleton.GetInstance(); switch (relatedEntityType) { case silverspun.RGBDiff.Dal.EntityType.ControlSetEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "ControlSetEntity"); break; case silverspun.RGBDiff.Dal.EntityType.ControlSetColourEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "ControlSetColourEntity"); break; case silverspun.RGBDiff.Dal.EntityType.ObserverDataSetEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "ObserverDataSetEntity"); break; case silverspun.RGBDiff.Dal.EntityType.ObserverDataSetColourEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "ObserverDataSetColourEntity"); 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(silverspun.RGBDiff.Dal.EntityType leftOperand, JoinHint joinType, silverspun.RGBDiff.Dal.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, silverspun.RGBDiff.Dal.EntityType rightOperand, string aliasRightOperand, IPredicate onClause) { base.InitClass(joinType, string.Empty, aliasRightOperand, onClause, leftOperand, GeneralEntityFactory.Create(rightOperand)); }