Thanks for the reply Joachim.

OK,  I have 107 products which are related to a category.
CategoryLocal cat = CategoryUtil.getLocalHome(  ).findByPrimaryKey( categoryId );
  | Collection products = cat.getActiveProducts( offset, limit )

At this point I would expect that 'products' has size=limit, but the actual size is 
107.

So to actually actually access the wanted data in the first run, one must use a for 
loop.

  | for ( int i = 0, imax = offset + limit; ( i < imax ) && it.hasNext(  ); i++ )
  | {
  |     _log.debug("  --> for : i : " + i );
  |     Object obj = it.next(  );
  |     if ( i >= offset )
  |     {
  |          _log.debug("  --> lst.add( getData( obj, type ) ) : " + obj + ", " + type 
);
  |          lst.add( getData( obj, type ) );
  |     }
  | }
  | 

Is this also the case for you, or can you just iterate over a 'limit'-sizes collection?

Andreas

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840863#3840863

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840863


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to