// if local limit is set, it overrides the pageOption.pageSize
if(limit!=Integer.MAX_VALUE){
gaeCtx.realPageSize = limit;
fetchOptions.limit(gaeCtx.realPageSize);
// pageOption is passivated to be sure it is not reused
pag.passivate();
}
// using pageOption.pageSize
else {
gaeCtx.realPageSize = pag.pageSize;
fetchOptions.limit(gaeCtx.realPageSize);