title: JOOQ parsing orderBy and orderDirection to use with dslcontext
body: <p>I'm getting orderBy and orderDirection from my controller and want to parse it and use it with my repository where I'm using DSLContext to query.</p>
  
  <p>Here is my method:</p>
  
  <pre class="lang-java prettyprint-override"><code>public List&lt;Map&lt;String, Object&gt;&gt; read(@NonNull final String schema,
                                        @NonNull final String tableName,
                                        @NonNull final List&lt;String&gt; columnNames,
                                        @NonNull final String queryConditions,
                                        @NonNull final String orderBy,
                                        @NonNull final String orderDirection) {
      final Table table = table(getTableWithSchema(schema, tableName));
      final List&lt;Condition&gt; conditions = conditionMapper.mapToConditions(queryConditions);
      final List&lt;Field&lt;?&gt;&gt; fields = fieldsMapper.mapToFields(columnNames);
      final SortField sortField = ???
  
      return crudRepository.read(table, fields, conditions, sortField);
  }
  </code></pre>
  
  <p>Where later on my crud calls it as:</p>
  
  <pre class="lang-java prettyprint-override"><code>public List&lt;Map&lt;String, Object&gt;&gt; read(@NonNull final Table&lt;?&gt; table,
                                        @NonNull final Collection&lt;Field&lt;?&gt;&gt; fields,
                                        @NonNull final Collection&lt;Condition&gt; conditions,
                                        @NonNull final SortField&lt;?&gt; sortField) {
      return dslContext
              .select(fields)
              .from(table)
              .where(conditions)
              .orderBy(sortField)
              .fetchMaps();
  }
  </code></pre>
  
  <p>How would I go about creating that sortField (only one) so I can pass that to dslContext?</p>