示例#1
0
 public ICompositePredicate AddLike(IRoleType role, string value)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleLikeSql(this.extent, role, value);
     return(this);
 }
示例#2
0
 public ICompositePredicate AddAnd()
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAndSql(this.extent);
     return((ICompositePredicate)this.filter);
 }
示例#3
0
 public ICompositePredicate AddInstanceof(IAssociationType association, IComposite type)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationInstanceofSql(this.extent, association, type, new List <IClass>(type.Classes).ToArray());
     return(this);
 }
示例#4
0
 public ICompositePredicate AddExists(IAssociationType association)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationExistsSql(this.extent, association);
     return(this);
 }
示例#5
0
 public ICompositePredicate AddInstanceof(IRoleType role, IComposite type)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleInstanceofSql(this.extent, role, type, new List <IClass>(type.Classes).ToArray());
     return(this);
 }
示例#6
0
 public ICompositePredicate AddEquals(IAssociationType association, IObject allorsObject)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationEqualsSql(this.extent, association, allorsObject);
     return(this);
 }
示例#7
0
 public ICompositePredicate AddExists(IRoleType role)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleExistsSql(this.extent, role);
     return(this);
 }
示例#8
0
 public ICompositePredicate AddContains(IAssociationType association, IObject containedObject)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationContainsSql(this.extent, association, containedObject);
     return(this);
 }
示例#9
0
        public ICompositePredicate AddEquals(IRoleType role, object obj)
        {
            this.CheckUnarity();
            this.extent.FlushCache();
            var equalsRole        = obj as IRoleType;
            var equalsAssociation = obj as IAssociationType;

            if (equalsRole != null)
            {
                this.filter = new AllorsPredicateRoleUnitEqualsRoleSql(this.extent, role, equalsRole);
            }
            else if (equalsAssociation != null)
            {
                throw new NotImplementedException();
            }
            else
            {
                if (role.ObjectType is IUnit)
                {
                    this.filter = new AllorsPredicateRoleUnitEqualsValueSql(this.extent, role, obj);
                }
                else
                {
                    this.filter = new AllorsPredicateRoleCompositeEqualsSql(this.extent, role, obj);
                }
            }

            return(this);
        }
示例#10
0
 public ICompositePredicate AddContains(IRoleType role, IObject containedObject)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleContainsSql(this.extent, role, containedObject);
     return(this);
 }
示例#11
0
 public ICompositePredicate AddContainedIn(IAssociationType association, IEnumerable <IObject> containingEnumerable)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AssociationContainedInEnumerable(this.extent, association, containingEnumerable);
     return(this);
 }
示例#12
0
 public ICompositePredicate AddContainedIn(IAssociationType association, Extent containingExtent)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationInExtentSql(this.extent, association, containingExtent);
     return(this);
 }
示例#13
0
 public ICompositePredicate AddContainedIn(IRoleType role, IEnumerable <IObject> containingEnumerable)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new RoleContainedInEnumerable(this.extent, role, containingEnumerable);
     return(this);
 }
示例#14
0
 public ICompositePredicate AddContainedIn(IRoleType role, Extent containingExtent)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleInExtentSql(this.extent, role, containingExtent);
     return(this);
 }
示例#15
0
        public ICompositePredicate AddLessThan(IRoleType role, object value)
        {
            this.CheckUnarity();
            this.extent.FlushCache();
            var lessThanRole        = value as IRoleType;
            var lessThanAssociation = value as IAssociationType;

            if (lessThanRole != null)
            {
                this.filter = new AllorsPredicateRoleLessThanRoleSql(this.extent, role, lessThanRole);
            }
            else if (lessThanAssociation != null)
            {
                throw new NotImplementedException();
            }
            else
            {
                this.filter = new AllorsPredicateRoleLessThanValueSql(this.extent, role, value);
            }

            return(this);
        }
示例#16
0
        public ICompositePredicate AddBetween(IRoleType role, object firstValue, object secondValue)
        {
            this.CheckUnarity();
            this.extent.FlushCache();
            var betweenRoleA        = firstValue as IRoleType;
            var betweenRoleB        = secondValue as IRoleType;
            var betweenAssociationA = firstValue as IAssociationType;
            var betweenAssociationB = secondValue as IAssociationType;

            if (betweenRoleA != null && betweenRoleB != null)
            {
                this.filter = new AllorsPredicateRoleBetweenRoleSql(this.extent, role, betweenRoleA, betweenRoleB);
            }
            else if (betweenAssociationA != null && betweenAssociationB != null)
            {
                throw new NotImplementedException();
            }
            else
            {
                this.filter = new AllorsPredicateRoleBetweenValueSql(this.extent, role, firstValue, secondValue);
            }

            return(this);
        }
示例#17
0
文件: Not.cs 项目: whesius/allors
        public ICompositePredicate AddLessThan(IRoleType role, object value)
        {
            this.CheckUnarity();
            this.extent.FlushCache();
            var lessThanRole = value as IRoleType;
            var lessThanAssociation = value as IAssociationType;
            if (lessThanRole != null)
            {
                this.filter = new AllorsPredicateRoleLessThanRoleSql(this.extent, role, lessThanRole);
            }
            else if (lessThanAssociation != null)
            {
                throw new NotImplementedException();
            }
            else
            {
                this.filter = new AllorsPredicateRoleLessThanValueSql(this.extent, role, value);
            }

            return this;
        }
示例#18
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddInstanceof(IRoleType role, IComposite type)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleInstanceofSql(this.extent, role, type, new List<IClass>(type.Classes).ToArray());
     return this;
 }
示例#19
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddInstanceof(IAssociationType association, IComposite type)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationInstanceofSql(this.extent, association, type, new List<IClass>(type.Classes).ToArray());
     return this;
 }
示例#20
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddExists(IRoleType role)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleExistsSql(this.extent, role);
     return this;
 }
示例#21
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddExists(IAssociationType association)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationExistsSql(this.extent, association);
     return this;
 }
示例#22
0
文件: Not.cs 项目: whesius/allors
        public ICompositePredicate AddEquals(IRoleType role, object obj)
        {
            this.CheckUnarity();
            this.extent.FlushCache();
            var equalsRole = obj as IRoleType;
            var equalsAssociation = obj as IAssociationType;
            if (equalsRole != null)
            {
                this.filter = new AllorsPredicateRoleUnitEqualsRoleSql(this.extent, role, equalsRole);
            }
            else if (equalsAssociation != null)
            {
                throw new NotImplementedException();
            }
            else
            {
                if (role.ObjectType is IUnit)
                {
                    this.filter = new AllorsPredicateRoleUnitEqualsValueSql(this.extent, role, obj);
                }
                else
                {
                    this.filter = new AllorsPredicateRoleCompositeEqualsSql(this.extent, role, obj);
                }
            }

            return this;
        }
示例#23
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddEquals(IAssociationType association, IObject allorsObject)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationEqualsSql(this.extent, association, allorsObject);
     return this;
 }
示例#24
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddContains(IRoleType role, IObject containedObject)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleContainsSql(this.extent, role, containedObject);
     return this;
 }
示例#25
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddContains(IAssociationType association, IObject containedObject)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationContainsSql(this.extent, association, containedObject);
     return this;
 }
示例#26
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddContainedIn(IAssociationType association, IEnumerable<IObject> containingEnumerable)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AssociationContainedInEnumerable(this.extent, association, containingEnumerable);
     return this;
 }
示例#27
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddContainedIn(IAssociationType association, Extent containingExtent)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAssociationInExtentSql(this.extent, association, containingExtent);
     return this;
 }
示例#28
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddContainedIn(IRoleType role, IEnumerable<IObject> containingEnumerable)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new RoleContainedInEnumerable(this.extent, role, containingEnumerable);
     return this;
 }
示例#29
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddContainedIn(IRoleType role, Extent containingExtent)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleInExtentSql(this.extent, role, containingExtent);
     return this;
 }
示例#30
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddLike(IRoleType role, string value)
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateRoleLikeSql(this.extent, role, value);
     return this;
 }
示例#31
0
文件: Not.cs 项目: whesius/allors
 public ICompositePredicate AddAnd()
 {
     this.CheckUnarity();
     this.extent.FlushCache();
     this.filter = new AllorsPredicateAndSql(this.extent);
     return (ICompositePredicate)this.filter;
 }
示例#32
0
文件: Not.cs 项目: whesius/allors
        public ICompositePredicate AddBetween(IRoleType role, object firstValue, object secondValue)
        {
            this.CheckUnarity();
            this.extent.FlushCache();
            var betweenRoleA = firstValue as IRoleType;
            var betweenRoleB = secondValue as IRoleType;
            var betweenAssociationA = firstValue as IAssociationType;
            var betweenAssociationB = secondValue as IAssociationType;
            if (betweenRoleA != null && betweenRoleB != null)
            {
                this.filter = new AllorsPredicateRoleBetweenRoleSql(this.extent, role, betweenRoleA, betweenRoleB);
            }
            else if (betweenAssociationA != null && betweenAssociationB != null)
            {
                throw new NotImplementedException();
            }
            else
            {
                this.filter = new AllorsPredicateRoleBetweenValueSql(this.extent, role, firstValue, secondValue);
            }

            return this;
        }