Example #1
0
            public Object DoInHibernate(ISession session)
            {
                ICriteria criteria = outer_HibernateCodeSetDao.CreateStandardCodeSystemCriteria(
                    f_criteria, session);

                criteria.SetProjection(NHibernate.Criterion.Projections.RowCount());
                return(criteria.List()[0]);
            }
Example #2
0
            public Object DoInHibernate(ISession session)
            {
                ICriteria criteria = outer_HibernateCodeSetDao.CreateStandardCodeSystemCriteria(
                    f_criteria, session);

                criteria.AddOrder(NHibernate.Criterion.Order.Asc("name") /*.IgnoreCase()*/);
                criteria.AddOrder(NHibernate.Criterion.Order.Asc("oid") /*.IgnoreCase()*/);
                criteria.AddOrder(NHibernate.Criterion.Order.Asc("id"));
                if (f_row >= 0 && f_row2 >= 0)
                {
                    criteria.SetFirstResult(f_row);
                    criteria.SetMaxResults(f_row2 - f_row);                             // 0-based; endRow = exclusive
                }
                return(criteria.List());
            }