title: Call a java method to generate SQL query in myBatis
body: <p>I am using myBatis to write some SQL queries, the problem is that I have tables that have several columns  ( around 50 column). So writing the <code>insert</code> query like this :</p>
  
  <pre><code>&lt;insert id="insert" parameterType="com.atos.tables.Table1&gt;
    insert into ot ( id, c1, c2, ....,c50) values (#{id}, #{c1},#{c2},... #{c50})
  &lt;/insert&gt;
  </code></pre>
  
  <p>is very tedious.</p>
  
  <p>I can create a method in java that generate the <code>String</code> of the queries automatically, but how can I call this method from the <code>mapper.xml</code> ?</p>
  
  <p>And if I use myBatis annotations I cannot call a method in an interface.
  I don't know if I am missing something, is there a way to do this??</p>
  
  <p>Thanks for helping.</p>