public void delete(int idEntidadBancaria){
        try{
        String deleteEntidad = "DELETE FROM entidadBancaria where idEntidad = ?";
        Connection connection = connectionFactory.getConnection();
        PreparedStatement prepared = null;
        prepared = connection.prepareStatement(deleteEntidad);
        prepared.setInt(1, idEntidadBancaria);
        int afectadas = prepared.executeUpdate();
        if (afectadas > 1) {
            throw new RuntimeException("Se ha eliminado mas de una fila");
        }
        }catch(Exception ex){
            throw new RuntimeException(ex);
        }
    }