Esempio n. 1
0
        public virtual T SetOrderBy(IQueryProperty property, NullHandlingOnOrder nullHandlingOnOrder)
        {
            SetOrderBy(property);
            this.nullHandlingOnOrder = nullHandlingOnOrder;

            return(this as T);
        }
Esempio n. 2
0
        public virtual T Direction(Direction direction)
        {
            if (orderProperty == null)
            {
                throw new ActivitiIllegalArgumentException("You should call any of the orderBy methods first before specifying a direction");
            }

            AddOrder(orderProperty.Name, direction.Name, nullHandlingOnOrder);
            orderProperty = null;

            return(this as T);
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        private void ApplyOrder(T query, Sort.Order order)
        {
            IQueryProperty property = GetOrderByProperty(order);

            if (property != null)
            {
                query.SetOrderBy(property);
            }
            else
            {
                throw new ActivitiIllegalArgumentException("The property '" + order.Property + "' cannot be used to sort the result.");
            }
        }
Esempio n. 4
0
        public virtual T SetOrderBy(IQueryProperty property)
        {
            this.orderProperty = property;

            return(this as T);
        }