public virtual Allors.Extent Intersect(Allors.Extent firstOperand, Allors.Extent secondOperand) { var firstExtent = firstOperand as Extent ?? ((ExtentSwitch)firstOperand).Extent; var secondExtent = secondOperand as Extent ?? ((ExtentSwitch)secondOperand).Extent; return(new ExtentOperation(this, firstExtent, secondExtent, ExtentOperationType.Intersect)); }
public ICompositePredicate AddContainedIn(IAssociationType association, Allors.Extent containingExtent) { this.CheckUnarity(); this.extent.FlushCache(); this.filter = new NotAssociationContainedInExtent(this.extent, association, containingExtent); return(this); }
public ICompositePredicate AddContainedIn(IRoleType role, Allors.Extent containingExtent) { this.CheckUnarity(); this.extent.FlushCache(); this.filter = new RoleContainedInExtent(this.extent, role, containingExtent); return(this); }
internal RoleContainedInExtent(ExtentFiltered extent, IRoleType role, Allors.Extent inExtent) { extent.CheckRole(role); PredicateAssertions.ValidateRoleContainedIn(role, inExtent); this.role = role; this.inExtent = ((Extent)inExtent).ContainedInExtent; }
internal AssociationContainedInExtent(ExtentFiltered extent, IAssociationType associationType, Allors.Extent containingExtent) { extent.CheckForAssociationType(associationType); PredicateAssertions.AssertAssociationContainedIn(associationType, containingExtent); this.associationType = associationType; this.containingExtent = containingExtent; }
internal RoleOneContainedInExtent(ExtentFiltered extent, IRoleType roleType, Allors.Extent containingExtent) { extent.CheckForRoleType(roleType); PredicateAssertions.ValidateRoleContainedIn(roleType, containingExtent); this.roleType = roleType; this.containingExtent = containingExtent; }
internal RoleManyContainedInExtent(ExtentFiltered extent, IRoleType roleType, Allors.Extent containingExtent) { extent.CheckForRoleType(roleType); PredicateAssertions.ValidateRoleContainedIn(roleType, containingExtent); this.roleType = roleType; this.containingExtent = containingExtent; }
internal void CopyToConnected(Allors.Extent connectedExtent) { connectedExtent.AddSort(this.roleType, this.direction); if (this.subSorter != null) { this.subSorter.CopyToConnected(connectedExtent); } }
public ICompositePredicate AddContainedIn(IRoleType role, Allors.Extent containingExtent) { if (role.IsMany) { this.Filters.Add(new RoleManyContainedInExtent(this.extent, role, containingExtent)); } else { this.Filters.Add(new RoleOneContainedInExtent(this.extent, role, containingExtent)); } this.extent.Invalidate(); return(this); }
public ICompositePredicate AddContainedIn(IRoleType role, Allors.Extent containingExtent) { this.CheckUnarity(); if (role.IsMany) { this.predicate = new RoleManyContainedInExtent(this.extent, role, containingExtent); } else { this.predicate = new RoleOneContainedInExtent(this.extent, role, containingExtent); } this.extent.Invalidate(); return(this); }
public virtual void SetCompositeRoles(IRelationType relationType, Allors.Extent roleObjects) { if (roleObjects == null || roleObjects.Count == 0) { this.RemoveCompositeRoles(relationType); } else { this.AssertExist(); var roleType = relationType.RoleType; // TODO: use CompositeRoles var previousRoles = new List <long>(this.Roles.GetCompositeRoles(roleType)); var newRoles = new HashSet <long>(); foreach (IObject roleObject in roleObjects) { if (roleObject != null) { RoleAssertions.CompositeRolesChecks(this, roleType, roleObject); var role = (Strategy)roleObject.Strategy; if (!previousRoles.Contains(role.ObjectId)) { this.Roles.AddCompositeRole(roleType, role); } newRoles.Add(role.ObjectId); } } foreach (var previousRole in previousRoles) { if (!newRoles.Contains(previousRole)) { this.Roles.RemoveCompositeRole(roleType, this.SqlSession.GetOrCreateAssociationForExistingObject(previousRole).Strategy); } } } }
public void Build(Allors.Extent extent) { extent.AddSort(RoleType, this.Descending ? SortDirection.Descending : SortDirection.Ascending); }
public AllorsPredicateRoleInExtentSql(AllorsExtentFilteredSql extent, IRoleType role, Allors.Extent inExtent) { extent.CheckRole(role); PredicateAssertions.ValidateRoleContainedIn(role, inExtent); this.role = role; this.inExtent = (AllorsExtentSql)inExtent; }
public Allors.Extent Except(Allors.Extent firstOperand, Allors.Extent secondOperand) => new ExtentOperation(((Extent)firstOperand).ContainedInExtent, ((Extent)secondOperand).ContainedInExtent, ExtentOperations.Except);
public ICompositePredicate AddContainedIn(IAssociationType association, Allors.Extent containingExtent) { this.predicates.Add(new AssociationContainedInExtent(this.extent, association, containingExtent)); this.extent.Invalidate(); return(this); }
public ICompositePredicate AddContainedIn(IRoleType role, Allors.Extent containingExtent) { this.Extent.FlushCache(); this.Filters.Add(new RoleContainedInExtent(this.Extent, role, containingExtent)); return(this); }
public Allors.Extent Intersect(Allors.Extent firstOperand, Allors.Extent secondOperand) { return(new ExtentOperation(((Extent)firstOperand).ContainedInExtent, ((Extent)secondOperand).ContainedInExtent, ExtentOperations.Intersect)); }
public ICompositePredicate AddContainedIn(IAssociationType association, Allors.Extent containingExtent) { this.Extent.FlushCache(); this.Filters.Add(new AssociationContainedInExtent(this.Extent, association, containingExtent)); return(this); }
public AssociationContainedInExtent(ExtentFiltered extent, IAssociationType association, Allors.Extent inExtent) { extent.CheckAssociation(association); CompositePredicateAssertions.AssertAssociationContainedIn(association, inExtent); this.association = association; this.inExtent = ((Extent)inExtent).ContainedInExtent; }