@Override
public boolean isPatchDocIdInitDocNameNeeded(final Connection connection) throws SQLException {
- final String value = this.getParameterValue(connection, "patchDocIdInitDocName");
- return !("true".equals(value));
+ final PreparedStatement ps = connection.prepareStatement(this.queryProvider.getQuery("isPatchDocIdInitDocNameNeeded"));
+ try {
+ final ResultSet rs = ps.executeQuery();
+ return rs.next() && (rs.getInt(1) > 0);
+ } finally {
+ ps.close();
+ }
}
}