protected override string getHql()
        {
            string          hql             = "select c from Comment c";
            var             conditions      = new List <string>();
            WhereHqlBuilder whereHqlBuilder = new WhereHqlBuilder(hql, conditions);

            return(whereHqlBuilder.Hql());
        }
Exemple #2
0
        protected override string getHql()
        {
            string hql        = string.Format("select i from Income i ");
            var    conditions = new List <string>();

            if (_category != null)
            {
                conditions.Add("i.Category.Id = " + _category.Id);
            }
            WhereHqlBuilder whereHqlBuilder = new WhereHqlBuilder(hql, conditions);

            return(whereHqlBuilder.Hql());
        }
        protected override string getHql()
        {
            string hql        = "select o from Order o";
            var    conditions = new List <string>();

            if (_user != null)
            {
                conditions.Add(" o.User.Id = " + _user.Id);
            }
            if (status.HasValue)
            {
                conditions.Add(" o.Status = '" + Enum.GetName(typeof(OrderStatus), status) + "'");
            }
            WhereHqlBuilder whereHqlBuilder = new WhereHqlBuilder(hql, conditions);

            return(whereHqlBuilder.Hql());
        }