public AbstractSaveConvertor(Class<T> clazz, final String namespace,
            final String localName, final Connection con,
            final String sqlExists, final String sqlInsert,
            final String sqlUpdate, final String sqlInsertNoGis,
            final String sqlUpdateNoGis) throws SQLException {
        this.clazz = clazz;
        this.namespace = namespace;
        this.localName = localName;
        this.connection = con;
        this.pstmExists =
                sqlExists == null ? null : con.prepareStatement(sqlExists);

        String sqlInsertAdj = Config.isNoGis() ? sqlInsertNoGis : sqlInsert;
        String sqlUpdateAdj = Config.isNoGis() ? sqlUpdateNoGis : sqlUpdate;

        if (Config.isMysqlDriver()) {
            sqlInsertAdj = fixSql(sqlInsertAdj);
            sqlUpdateAdj = fixSql(sqlUpdateAdj);
        }

        if (sqlInsertAdj != null) {
            sqlInsertAdj = formatGeometry(sqlInsertAdj);
        }

        if (sqlUpdateAdj != null) {
            sqlUpdateAdj = formatGeometry(sqlUpdateAdj);
        }

        this.pstmInsert = sqlInsertAdj == null
                ? null : con.prepareStatement(sqlInsertAdj);
        this.pstmUpdate = sqlUpdateAdj == null
                ? null : con.prepareStatement(sqlUpdateAdj);
    }