title: JOOQ: Dynamic join conditions
body: <p>I would like to create <strong>conditions</strong> from this <strong>select</strong> in JOOQ. Because in my case I want to declare a dynamic query and check if TABLE_C.FIELDC contains "foo" only when I need...</p>
  
  <p><strong>Example</strong>:</p>
  
  <pre><code>create.select().from(TABLE_A).join(TABLE_B).onKey(Keys.FK_TABLEA_TABLEB)
                      .join(TABLE_C).onKey(Keys.FK_TABLEB_TABLEC)
                      .where(TABLE_C.FIELDC.containsIgnoreCase("foo");
  </code></pre>
  
  <p><strong>to:</strong></p>
  
  <pre><code>SelectFinalStep select = create.select().from(TABLEA);
  
  if (isFooSearched) { 
     query.addCondition( &lt;JOIN&gt; and &lt;CONTAINS&gt; like first example) 
  }
  </code></pre>
  
  <p>How can I do this?</p>