Currently the queries are defined as constants within @JdbcMessageProvider@: <pre class="code"><code class="java"> private static final String QUERY_INSERT = "INSERT INTO %s (%s, %s, %s, %s, %s, %s) VALUES (?, ?, ?, ?, ?, ?)"; private static final String QUERY_DELETE = "DELETE FROM %s WHERE %s = ?"; private static final String QUERY_SELECT_BASENAMES = "SELECT DISTINCT %s from %s"; private static final String QUERY_SELECT_MESSAGES = "SELECT %s,%s,%s,%s,%s FROM %s WHERE %s = ?"; </code></pre> Reading those should be wrapped in protected metods like: <pre class="code"><code class="java"> protected String getSelectMessagesQuery() { return QUERY_SELECT_MESSAGES; } </code></pre> So users could customize the queries by doing the following in a subclass: <pre class="code"><code class="java"> @Override protected String getSelectMessagesQuery() { return super.getSelectMessagesQuery() + " WHERE account = 2"; } </code></pre>
Currently the queries are defined as constants within @JdbcMessageProvider@:
Reading those should be wrapped in protected metods like:
So users could customize the queries by doing the following in a subclass: