I have the following NAME_1 class in my Spring Boot application which uses Spring JDBC.

The overridden processRow() method will be invoked by Spring framework repeatedly (once invocation for per the database table row returned).

When processRow() is invoked as part of processing the first row,I don't want to execute the following statement:

completableFutures.add(checkContactsOnNewAcctAndCreateDfltPrefsAsync(dbContactsForDfltPrefsOnNewAcct, 
              idntyGuidByIdntyIdOfPrimaryIdnty, prvContactPrefKafkaAcctInfo));


Without putting the if() condition, how can I prevent the above statement from getting executed while processing the first row?

 if(prvPrefAcctId != -1) {
 }

Following is my NAME_1 class:

  private class ContactsOnNewAcctsRowCallbackHandler implements org.springframework.jdbc.core.RowCallbackHandler{
    
    
    private List<ContactData> dbContactsForDfltPrefsOnNewAcct;
    
    private Map<Long, String> idntyGuidByIdntyIdOfPrimaryIdnty;
    
    private long prvPrefAcctId;
    
    private ContactPrefKafkaAccountInfo contactPrefKafkaAcctInfo;
    
    private CompletableFuture<Void> completableFutures;
    
    
    
    public ContactsOnNewAcctsRowCallbackHandler() {

      prvPrefAcctId = -1L;
      
      completableFutures = new ArrayList<>();

    }
    
    @Override
    public void processRow(ResultSet rs) throws SQLException {
      
      ContactData dbContactForDfltPref = mapDbContactForDfltPref(rs);
      
      if(prvPrefAcctId != dbContactForDfltPref.getPrefAccountID())) {
   