Ejemplo n.º 1
0
        internal AssociationExists(ExtentFiltered extent, IAssociationType associationType)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.ValidateAssociationExists(associationType);

            this.associationType = associationType;
        }
Ejemplo n.º 2
0
        internal RoleExists(ExtentFiltered extent, IRoleType roleType)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleExists(roleType);

            this.roleType = roleType;
        }
Ejemplo n.º 3
0
        internal AssociationExists(ExtentFiltered extent, IAssociationType associationType)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.ValidateAssociationExists(associationType);

            this.associationType = associationType;
        }
Ejemplo n.º 4
0
        internal RoleExists(ExtentFiltered extent, IRoleType roleType)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleExists(roleType);

            this.roleType = roleType;
        }
Ejemplo n.º 5
0
        internal AssociationContainedInExtent(ExtentFiltered extent, IAssociationType associationType, Allors.Extent containingExtent)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationContainedIn(associationType, containingExtent);

            this.associationType = associationType;
            this.containingExtent = containingExtent;
        }
Ejemplo n.º 6
0
        internal RoleContains(ExtentFiltered extent, IRoleType roleType, IObject containedObject)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleContains(roleType, containedObject);

            this.roleType        = roleType;
            this.containedObject = containedObject;
        }
Ejemplo n.º 7
0
        internal AssociationContains(ExtentFiltered extent, IAssociationType associationType, IObject containedObject)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationContains(associationType, containedObject);

            this.associationType = associationType;
            this.containedObject = containedObject;
        }
Ejemplo n.º 8
0
        internal RoleContains(ExtentFiltered extent, IRoleType roleType, IObject containedObject)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleContains(roleType, containedObject);

            this.roleType = roleType;
            this.containedObject = containedObject;
        }
        internal RoleManyContainedInEnumerable(ExtentFiltered extent, IRoleType roleType, IEnumerable <IObject> containingEnumerable)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleContainedIn(roleType, containingEnumerable);

            this.roleType             = roleType;
            this.containingEnumerable = containingEnumerable;
        }
Ejemplo n.º 10
0
        internal RoleManyContainedInEnumerable(ExtentFiltered extent, IRoleType roleType, IEnumerable<IObject> containingEnumerable)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleContainedIn(roleType, containingEnumerable);

            this.roleType = roleType;
            this.containingEnumerable = containingEnumerable;
        }
Ejemplo n.º 11
0
        internal AssociationContainedInExtent(ExtentFiltered extent, IAssociationType associationType, Allors.Extent containingExtent)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationContainedIn(associationType, containingExtent);

            this.associationType  = associationType;
            this.containingExtent = containingExtent;
        }
Ejemplo n.º 12
0
        internal AssociationEquals(ExtentFiltered extent, IAssociationType associationType, IObject equals)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationEquals(associationType, equals);

            this.associationType = associationType;
            this.equals = equals;
        }
Ejemplo n.º 13
0
        internal AssociationInstanceOf(ExtentFiltered extent, IAssociationType associationType, IObjectType instanceObjectType)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.ValidateAssociationInstanceof(associationType, instanceObjectType);

            this.associationType = associationType;
            this.objectType      = instanceObjectType;
        }
Ejemplo n.º 14
0
        internal AssociationEquals(ExtentFiltered extent, IAssociationType associationType, IObject equals)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationEquals(associationType, equals);

            this.associationType = associationType;
            this.equals          = equals;
        }
Ejemplo n.º 15
0
        internal AssociationInstanceOf(ExtentFiltered extent, IAssociationType associationType, IObjectType instanceObjectType)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.ValidateAssociationInstanceof(associationType, instanceObjectType);

            this.associationType = associationType;
            this.objectType = instanceObjectType;
        }
Ejemplo n.º 16
0
        internal RoleOneContainedInExtent(ExtentFiltered extent, IRoleType roleType, Allors.Extent containingExtent)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleContainedIn(roleType, containingExtent);

            this.roleType = roleType;
            this.containingExtent = containingExtent;
        }
Ejemplo n.º 17
0
        internal AssociationContains(ExtentFiltered extent, IAssociationType associationType, IObject containedObject)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationContains(associationType, containedObject);

            this.associationType = associationType;
            this.containedObject = containedObject;
        }
Ejemplo n.º 18
0
        internal RoleCompositeEqualsValue(ExtentFiltered extent, IRoleType roleType, object equals)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleEquals(roleType, equals);

            this.roleType = roleType;
            this.equals   = equals;
        }
        internal AssociationContainedInEnumerable(ExtentFiltered extent, IAssociationType associationType, IEnumerable<IObject> containingEnumerable)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationContainedIn(associationType, containingEnumerable);

            this.associationType = associationType;
            this.containingEnumerable = containingEnumerable;
        }
Ejemplo n.º 20
0
        internal RoleOneContainedInExtent(ExtentFiltered extent, IRoleType roleType, Allors.Extent containingExtent)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleContainedIn(roleType, containingExtent);

            this.roleType         = roleType;
            this.containingExtent = containingExtent;
        }
Ejemplo n.º 21
0
        internal RoleInstanceof(ExtentFiltered extent, IRoleType roleType, IComposite objectType)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleInstanceOf(roleType, objectType);

            this.roleType = roleType;
            this.objectType = objectType;
        }
Ejemplo n.º 22
0
        internal RoleCompositeEqualsValue(ExtentFiltered extent, IRoleType roleType, object equals)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleEquals(roleType, equals);

            this.roleType = roleType;
            this.equals = equals;
        }
Ejemplo n.º 23
0
        internal RoleInstanceof(ExtentFiltered extent, IRoleType roleType, IComposite objectType)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleInstanceOf(roleType, objectType);

            this.roleType   = roleType;
            this.objectType = objectType;
        }
        internal AssociationContainedInEnumerable(ExtentFiltered extent, IAssociationType associationType, IEnumerable <IObject> containingEnumerable)
        {
            extent.CheckForAssociationType(associationType);
            PredicateAssertions.AssertAssociationContainedIn(associationType, containingEnumerable);

            this.associationType      = associationType;
            this.containingEnumerable = containingEnumerable;
        }
Ejemplo n.º 25
0
        internal RoleLessThan(ExtentFiltered extent, IRoleType roleType, object compare)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleLessThan(roleType, compare);

            this.extent = extent;
            this.roleType = roleType;
            this.compare = compare;
        }
Ejemplo n.º 26
0
        internal RoleLike(ExtentFiltered extent, IRoleType roleType, string like)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleLikeFilter(roleType, like);

            this.roleType = roleType;
            this.isEmpty = like.Length == 0;
            this.regex = new Regex("^" + like.Replace("%", ".*") + "$");
        }
Ejemplo n.º 27
0
        internal RoleLike(ExtentFiltered extent, IRoleType roleType, string like)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleLikeFilter(roleType, like);

            this.roleType = roleType;
            this.isEmpty  = like.Length == 0;
            this.regex    = new Regex("^" + like.Replace("%", ".*") + "$");
        }
Ejemplo n.º 28
0
        internal RoleLessThan(ExtentFiltered extent, IRoleType roleType, object compare)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleLessThan(roleType, compare);

            this.extent   = extent;
            this.roleType = roleType;
            this.compare  = compare;
        }
Ejemplo n.º 29
0
        internal RoleBetween(ExtentFiltered extent, IRoleType roleType, object first, object second)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleBetween(roleType, first, second);

            this.extent   = extent;
            this.roleType = roleType;

            this.first  = first;
            this.second = second;
        }
Ejemplo n.º 30
0
        internal RoleBetween(ExtentFiltered extent, IRoleType roleType, object first, object second)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleBetween(roleType, first, second);

            this.extent = extent;
            this.roleType = roleType;

            this.first = first;
            this.second = second;
        }
Ejemplo n.º 31
0
 internal override void UpgradeTo(ExtentFiltered extent)
 {
     if (this.associationType.RoleType.IsMany)
     {
         extent.Filter.AddContains(this.associationType.RoleType, this.roleStrategy.GetObject());
     }
     else
     {
         extent.Filter.AddEquals(this.associationType.RoleType, this.roleStrategy.GetObject());
     }
 }
Ejemplo n.º 32
0
        internal RoleUnitEquals(ExtentFiltered extent, IRoleType roleType, object equals)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleEquals(roleType, equals);

            this.extent   = extent;
            this.roleType = roleType;
            if (equals is Enum)
            {
                var unitType = roleType.ObjectType as IUnit;
                if (unitType != null && unitType.IsInteger)
                {
                    this.equals = (int)equals;
                }
                else
                {
                    throw new Exception("Role Object Type " + roleType.ObjectType.SingularName + " doesn't support enumerations.");
                }
            }
            else
            {
                this.equals = equals;
            }
        }
Ejemplo n.º 33
0
        internal RoleUnitEquals(ExtentFiltered extent, IRoleType roleType, object equals)
        {
            extent.CheckForRoleType(roleType);
            PredicateAssertions.ValidateRoleEquals(roleType, equals);

            this.extent = extent;
            this.roleType = roleType;
            if (equals is Enum)
            {
                var unitType = roleType.ObjectType as IUnit;
                if (unitType != null && unitType.IsInteger)
                {
                    this.equals = (int)equals;
                }
                else
                {
                    throw new Exception("Role Object Type " + roleType.ObjectType.SingularName + " doesn't support enumerations.");
                }
            }
            else
            {
                this.equals = equals;
            }
        }
Ejemplo n.º 34
0
 internal override void UpgradeTo(ExtentFiltered extent)
 {
     if (this.roleType.AssociationType.IsMany)
     {
         extent.Filter.AddContains(this.roleType.AssociationType, this.associationStrategy.GetObject());
     }
     else
     {
         extent.Filter.AddEquals(this.roleType.AssociationType, this.associationStrategy.GetObject());
     }
 }
Ejemplo n.º 35
0
 internal CompositePredicate(ExtentFiltered extent)
 {
     this.extent = extent;
     this.predicates = new List<Predicate>(4);
 }
Ejemplo n.º 36
0
 internal Not(ExtentFiltered extent)
 {
     this.extent = extent;
 }
Ejemplo n.º 37
0
 internal CompositePredicate(ExtentFiltered extent)
 {
     this.extent     = extent;
     this.predicates = new List <Predicate>(4);
 }
Ejemplo n.º 38
0
 internal Not(ExtentFiltered extent)
 {
     this.extent = extent;
 }