Ejemplo n.º 1
0
        public override IObjectSet Select()
        {
            if (_limit == -1)
            {
                return(_query.Execute());
            }
            IQueryResult      queryResult   = _query.GetQueryResult();
            IdListQueryResult limitedResult = new IdListQueryResult(_query.Transaction(), _limit
                                                                    );
            int           counter = 0;
            IIntIterator4 i       = queryResult.IterateIDs();

            while (i.MoveNext())
            {
                if (counter++ >= _limit)
                {
                    break;
                }
                limitedResult.Add(i.CurrentInt());
            }
            return(new ObjectSetFacade(limitedResult));
        }