protected Object [ ] getFieldObjects ( Object data ) throws SQLException { Object [ ] objects = new Object [ argFieldTypes . length ] ; for ( int i = 0 ; i < argFieldTypes . length ; i ++ ) { FieldType fieldType = argFieldTypes [ i ] ; if ( fieldType . isAllowGeneratedIdInsert ( ) ) { objects [ i ] = fieldType . getFieldValueIfNotDefault ( data ) ; } else { objects [ i ] = fieldType . extractJavaFieldToSqlArgValue ( data ) ; } if ( objects [ i ] == null ) { // NOTE: the default value could be null as well objects [ i ] = fieldType . getDefaultValue ( ) ; } } return objects ; }
Return the array of field objects pulled from the data object .