Change the functionality logic of hasNext() and nexRecord().