public Not(ExtentFiltered extent) { this.extent = extent; if (extent.Strategy != null) { var allorsObject = extent.Strategy.GetObject(); if (extent.AssociationType != null) { var role = extent.AssociationType.RoleType; if (role.IsMany) { this.AddContains(role, allorsObject); } else { this.AddEquals(role, allorsObject); } } else { var association = extent.RoleType.AssociationType; if (association.IsMany) { this.AddContains(association, allorsObject); } else { this.AddEquals(association, allorsObject); } } } }
public RoleEqualsRole(ExtentFiltered extent, IRoleType role, IRoleType equalsRole) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleEquals(role, equalsRole); this.role = role; this.equalsRole = equalsRole; }
public RoleLessThanRole(ExtentFiltered extent, IRoleType role, IRoleType lessThanRole) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleLessThan(role, lessThanRole); this.role = role; this.lessThanRole = lessThanRole; }
public AssociationContainedInExtent(ExtentFiltered extent, IAssociationType association, Allors.Extent inExtent) { extent.CheckAssociation(association); CompositePredicateAssertions.AssertAssociationContainedIn(association, inExtent); this.association = association; this.inExtent = ((Extent)inExtent).ContainedInExtent; }
public AssociationContains(ExtentFiltered extent, IAssociationType association, IObject allorsObject) { extent.CheckAssociation(association); CompositePredicateAssertions.AssertAssociationContains(association, allorsObject); this.association = association; this.allorsObject = allorsObject; }
public RoleContainedInExtent(ExtentFiltered extent, IRoleType role, Allors.Extent inExtent) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleContainedIn(role, inExtent); this.role = role; this.inExtent = ((Extent)inExtent).ContainedInExtent; }
public RoleContains(ExtentFiltered extent, IRoleType role, IObject allorsObject) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleContains(role, allorsObject); this.role = role; this.allorsObject = allorsObject; }
public RoleGreaterThanRole(ExtentFiltered extent, IRoleType role, IRoleType greaterThanRole) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleGreaterThan(role, greaterThanRole); this.role = role; this.greaterThanRole = greaterThanRole; }
public RoleGreaterThanValue(ExtentFiltered extent, IRoleType roleType, object obj) { extent.CheckRole(roleType); CompositePredicateAssertions.ValidateRoleGreaterThan(roleType, obj); this.roleType = roleType; this.obj = roleType.Normalize(obj); }
public RoleContainedInEnumerable(ExtentFiltered extent, IRoleType role, IEnumerable <IObject> enumerable) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleContainedIn(role, this.enumerable); this.role = role; this.enumerable = enumerable; }
protected CompositePredicate(ExtentFiltered extent) { this.extent = extent; this.filters = new List <Predicate>(4); if (extent.Strategy != null) { var allorsObject = extent.Strategy.GetObject(); if (extent.AssociationType != null) { var role = extent.AssociationType.RoleType; if (role.IsMany) { this.AddContains(role, allorsObject); } else { this.AddEquals(role, allorsObject); } } else { var association = extent.RoleType.AssociationType; if (association.IsMany) { this.AddContains(association, allorsObject); } else { this.AddEquals(association, allorsObject); } } } }
public RoleInstanceof(ExtentFiltered extent, IRoleType role, IObjectType instanceType, IObjectType[] instanceClasses) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleInstanceOf(role, instanceType); this.role = role; this.instanceClasses = instanceClasses; }
public AssociationContainedInEnumerable(ExtentFiltered extent, IAssociationType association, IEnumerable <IObject> enumerable) { extent.CheckAssociation(association); CompositePredicateAssertions.AssertAssociationContainedIn(association, this.enumerable); this.association = association; this.enumerable = enumerable; }
public AssociationInstanceOf(ExtentFiltered extent, IAssociationType association, IObjectType instanceType, IObjectType[] instanceClasses) { extent.CheckAssociation(association); CompositePredicateAssertions.ValidateAssociationInstanceof(association, instanceType); this.association = association; this.instanceClasses = instanceClasses; }
public RoleLike(ExtentFiltered extent, IRoleType role, string like) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleLikeFilter(role, like); this.role = role; this.like = like; }
private void LazyUpgrade() { if (this.upgrade == null) { this.upgrade = new ExtentFiltered(this.strategy.SqlSession, this.strategy, this.roleType); } }
public RoleBetweenValue(ExtentFiltered extent, IRoleType roleType, object first, object second) { extent.CheckRole(roleType); CompositePredicateAssertions.ValidateRoleBetween(roleType, first, second); this.roleType = roleType; this.first = roleType.Normalize(first); this.second = roleType.Normalize(second); }
public RoleBetweenRole(ExtentFiltered extent, IRoleType role, IRoleType first, IRoleType second) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleBetween(role, first, second); this.role = role; this.first = first; this.second = second; }
public RoleEqualsValue(ExtentFiltered extent, IRoleType roleType, object obj) { extent.CheckRole(roleType); CompositePredicateAssertions.ValidateRoleEquals(roleType, obj); this.roleType = roleType; if (obj is Enum) { var unitType = roleType.ObjectType as IUnit; if (unitType != null && unitType.IsInteger) { this.obj = (int)obj; } else { throw new Exception("Role Object Type " + roleType.ObjectType.SingularName + " doesn't support enumerations."); } } else { this.obj = roleType.ObjectType is IUnit?roleType.Normalize(obj) : obj; } }
public AssociationExists(ExtentFiltered extent, IAssociationType association) { extent.CheckAssociation(association); CompositePredicateAssertions.ValidateAssociationExists(association); this.association = association; }
public RoleExists(ExtentFiltered extent, IRoleType role) { extent.CheckRole(role); CompositePredicateAssertions.ValidateRoleExists(role); this.role = role; }