/// <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, policyDB.EntityType rightOperand, string aliasRightOperand, IPredicate onClause) { base.InitClass(joinType, string.Empty, aliasRightOperand, onClause, leftOperand, GeneralEntityFactory.Create(rightOperand)); }
/// <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(policyDB.EntityType leftOperand, JoinHint joinType, policyDB.EntityType rightOperand, string aliasLeftOperand, string aliasRightOperand, IPredicate onClause) { base.InitClass(joinType, aliasLeftOperand, aliasRightOperand, onClause, GeneralEntityFactory.Create(leftOperand), GeneralEntityFactory.Create(rightOperand)); }
/// <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(policyDB.EntityType relatedEntityType) { IEntityFields fieldsToReturn = null; IInheritanceInfoProvider inheritanceProvider = InheritanceInfoProviderSingleton.GetInstance(); IFieldInfoProvider fieldProvider = FieldInfoProviderSingleton.GetInstance(); IPersistenceInfoProvider persistenceProvider = PersistenceInfoProviderSingleton.GetInstance(); switch (relatedEntityType) { case policyDB.EntityType.AttributeEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "AttributeEntity"); break; case policyDB.EntityType.AttributeTypeEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "AttributeTypeEntity"); break; case policyDB.EntityType.AttributeValueEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "AttributeValueEntity"); break; case policyDB.EntityType.CombineModeEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "CombineModeEntity"); break; case policyDB.EntityType.ContextEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "ContextEntity"); break; case policyDB.EntityType.DecisionNodeEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "DecisionNodeEntity"); break; case policyDB.EntityType.EffectEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "EffectEntity"); break; case policyDB.EntityType.LibraryEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "LibraryEntity"); break; case policyDB.EntityType.PolicyEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "PolicyEntity"); break; case policyDB.EntityType.PolicyDocumentEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "PolicyDocumentEntity"); break; case policyDB.EntityType.PolicyLinkEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "PolicyLinkEntity"); break; case policyDB.EntityType.QueryEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "QueryEntity"); break; case policyDB.EntityType.QueryValueEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "QueryValueEntity"); break; case policyDB.EntityType.RuleEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "RuleEntity"); break; case policyDB.EntityType.TargetEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "TargetEntity"); break; case policyDB.EntityType.TargetConditionEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "TargetConditionEntity"); break; case policyDB.EntityType.UriComponentEntity: fieldsToReturn = fieldProvider.GetEntityFields(inheritanceProvider, persistenceProvider, "UriComponentEntity"); break; } return(fieldsToReturn); }