code: private Record setDefault(Record record) {
          int size = record.size();
          for (int i = 0; i < size; i++)
              if (record.get(i) == null) {
                  @SuppressWarnings("unchecked")
                  Field<Object> field = (Field<Object>) record.field(i);
                  if (!field.getDataType().nullable() && !field.getDataType().identity())
                      record.set(field, DSL.defaultValue());
              }
          return record;
      }
docs: Defaults fields that have a default value and are nullable.
  @param record the record
  @return the record