closeStatementAndConnection(statement);
closeStatement(statement);
    public void delete(DynaBean dynaBean) throws SQLException    {        Connection        connection = borrowConnection();        PreparedStatement statement  = null;        try        {            SqlDynaClass      dynaClass   = getSqlDynaClass(dynaBean);            SqlDynaProperty[] primaryKeys = dynaClass.getPrimaryKeyProperties();            if (primaryKeys.length == 0)            {                _log.warn("Cannot delete type " + dynaClass + " as there are no primary keys");                return;            }            String sql = createDeleteSql(dynaClass, primaryKeys, null);            if (_log.isDebugEnabled())            {                _log.debug("About to execute SQL " + sql);            }            statement = connection.prepareStatement(sql);            for (int idx = 0; idx < primaryKeys.length; idx++)            {                setObject(statement, idx + 1, dynaBean, primaryKeys[idx]);            }            int count = statement.executeUpdate();            if (count != 1)            {                _log.warn("Attempted to delete a single row " + dynaBean +                          " in table " + dynaClass.getTableName() +                          " but changed " + count + " row(s).");            }        }        finally        {            closeStatementAndConnection(statement);            returnConnection(connection);        }    }