protected boolean verifyLimit(Collection result,int limit,ExecutionContext context){
  if (limit > 0) {
    return result.size() == limit;
  }
  return false;
}

protected boolean verifyLimit ( Collection result , int limit , ExecutionContext context ) { if ( limit > 0 ) { return result . size ( ) == limit ; } return false ; }
checks the limit for the resultset for distinct and non - distinct queries separately . in case of non - distinct distinct elements size of result - set is matched against limit passed in as an argument .
