public void cleanBuffer ( BaseBuffer buffer , Record record ) { Vector < Object > vector = ( Vector ) buffer . getPhysicalData ( ) ; int iCurrentIndex = 0 ; buffer . resetPosition ( ) ; // Start at the first field int iFieldCount = record . getFieldCount ( ) ; // Number of fields to read in for ( int iFieldSeq = Constants . MAIN_FIELD ; iFieldSeq <= iFieldCount + Constants . MAIN_FIELD - 1 ; iFieldSeq ++ ) { BaseField field = record . getField ( iFieldSeq ) ; if ( ! buffer . skipField ( field ) ) { if ( field . isModified ( ) ) vector . set ( iCurrentIndex , BaseBuffer . DATA_SKIP ) ; // If target modified don't move data //? else if (record.getEditMode() == DBConstants.EDIT_ADD) // if (field.getDefault() == vector.get(iCurrentIndex)) // vector.set(iCurrentIndex, BaseBuffer.DATA_SKIP); // On Add if data is the default, don't set. iCurrentIndex ++ ; } } }
Clean the buffer of fields that will change a field that has been modified by the client .