private void processBatch() throws ConnectionException
    {
        PartnerConnection con = Auth.getConnection();
        SaveResult[] sr;
        UpsertResult[] ur;
        switch(currentAction){
            case INSERT: sr = con.create(ObjectsBatch);
                         if(sw != null) checkErrors(sr);
                         break;
            case UPDATE: sr = con.update(ObjectsBatch);
                         if(sw != null) checkErrors(sr);
                         break;
            case UPSERT: ur = con.upsert(upsertField, ObjectsBatch);
                         if(sw != null) checkErrors(ur);
                         break;
        }
    }