this method returns a long, which can hold up to max int -1 divided by 2 number (correct me if I am wrong). So I guess there is really no need of long for a record number. (if criteria contains all null and db doesn't have a deleted record, then this mehtod will return all record numbers). So why do we have a long recNo? maybe a recNo can arbitrarily start from some large number?