code: private Object[] reorderFieldValues(FieldDescriptor[] flds, String[] fieldNames, Object[] fieldValues)
      {
          String fieldName;
          Object[] orderedValues = new Object[flds.length];
          for(int i = 0; i < flds.length; i++)
          {
              fieldName = flds[i].getPersistentField().getName();
              int realPosition = findIndexForName(fieldNames, fieldName);
              orderedValues[i] = fieldValues[realPosition];
          }
          return orderedValues;
      }
docs: This method orders the specified field values based on the
  specified {@link org.apache.ojb.broker.metadata.FieldDescriptor}.
  
  @param flds The {@link org.apache.ojb.broker.metadata.FieldDescriptor} array.
  @param fieldNames The field names.
  @param fieldValues The field values.
  @return The ordered field values.