title: generic way to form jdbcTemplate query in Dao
body: <p>I have to use jdbcTemplate to have multiple different update query</p>
  <p>I have an abstract base Dao layer</p>
  <pre><code>public abstract class MysqlBaseDao&lt;V extends Serializable&gt; {
  
  public void update(V value) {
      jdbcTemplate.execute(getUpdateQuery(), statementCallback(value));
  }
  </code></pre>
  <p>with a service layer Dao</p>
  <pre><code>public class ServiceDao extends MysqlBaseDao&lt;MyDataClass&gt; {
      private static final String UPDATE_QUERY = &quot;UPDATE table SET `status` = ? WHERE `uuid` = ?&quot;;
      private static final String UPDATE_QUERY_BYID = &quot;UPDATE table SET `status` = ? WHERE `id` = ?&quot;;
  
      protected String getUpdateQuery() {
          return UPDATE_QUERY;
      }
  
      protected PreparedStatementCallback statementCallback(MyDataClass value){
          return statement -&gt; {
          int i = 1;
          statement.setString(i++, value.getStatus());
          statement.setString(i++, value.getuuid());
          return statement.execute();
      };
  
  }
  </code></pre>
  <p>Service layer</p>
  <pre><code>public class ServiceImpl implements ServiceDao {
       public MyDataClass update(MyDataClass myDataClass) {
           ServiceDao.update(myDataClass);
       }
  }
  </code></pre>
  <p>I want to be able to call both UPDATE_QUERY and UPDATE_QUERY_BYID from my service layer without individually mapping them</p>
  <p>I have many versions of UPDATE QUERY so having them manually map is not an option</p>