resultSetAndStatement.m_rs.first(); ResultSetMetaData resultSetMetaData = resultSetAndStatement.m_rs.getMetaData();
if (resultSetAndStatement.m_rs.first()) { ResultSetMetaData resultSetMetaData = resultSetAndStatement.m_rs.getMetaData();
    private void concatInverseSQLInstruction(String sqlStatement, ClassDescriptor classDescriptor,            ValueContainer[] valueContainers1, ValueContainer[] valueContainers2) {        try {            StringBuffer inverseSQLInstruction = new StringBuffer();            // INSERT INTO PERSON_ROLE (KEY_PERSON,KEY_ROLE) VALUES (?,?)            if (sqlStatement.startsWith("INSERT") || sqlStatement.startsWith("insert")) {                Properties properties = getPropertyValuePairs(sqlStatement, valueContainers1,                        valueContainers2);                inverseSQLInstruction.append("delete from ");                inverseSQLInstruction.append(getTableNameFromInsertInstruction(sqlStatement));                inverseSQLInstruction.append(" where ");                for (Iterator iterator = properties.entrySet().iterator(); iterator.hasNext();) {                    Entry entry = (Entry) iterator.next();                    inverseSQLInstruction.append(entry.getKey());                    inverseSQLInstruction.append(" = ");                    inverseSQLInstruction.append("'");                    inverseSQLInstruction.append(entry.getValue());                    inverseSQLInstruction.append("'");                    if (iterator.hasNext()) {                        inverseSQLInstruction.append(" and ");                    }                }                inverseSQLInstruction.append(";\n");                // DELETE FROM PERSON_ROLE WHERE KEY_PERSON=? AND KEY_ROLE=?            } else if (sqlStatement.startsWith("DELETE") || sqlStatement.startsWith("delete")) {                ResultSetAndStatement resultSetAndStatement = getOriginalResultSet(sqlStatement,                        classDescriptor, valueContainers1, valueContainers2);                resultSetAndStatement.m_rs.first();                ResultSetMetaData resultSetMetaData = resultSetAndStatement.m_rs.getMetaData();                inverseSQLInstruction.append("insert into ");                inverseSQLInstruction.append(getTableNameFromInsertInstruction(sqlStatement));                inverseSQLInstruction.append(" (");                StringBuffer values = new StringBuffer();                for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) {                    inverseSQLInstruction.append(resultSetMetaData.getColumnName(i));                    values.append("'");                    values.append(resultSetAndStatement.m_rs.getString(i));                    values.append("'");                    if (i != resultSetMetaData.getColumnCount()) {                        inverseSQLInstruction.append(", ");                        values.append(", ");                    }                }                inverseSQLInstruction.append(") values (");                inverseSQLInstruction.append(values);                inverseSQLInstruction.append(");\n");            } else {                throw new RuntimeException("Method not suported");            }            FileUtils.writeFile(PropertiesManager.getProperty("storageFileName"), inverseSQLInstruction                    .toString(), true);        } catch (Exception e) {            e.printStackTrace();        }    }